Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-42860

QCollator::compare returns values outside its documented range

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.3.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Linux (Ubuntu 14.04), Qt 5.3.2

      Description

      In the documentation for QCollator it states that it:

      Returns -1, 0 or 1 depending on whether s1 is smaller, equal or larger than s2.

      This is not the behaviour I'm seeing on Linux - for example comparing "Sambia" and "Samoa" (in the de_DE locale) returns -13. As far as I can see it is simply calling std::wcscoll which is definitely not (always) returning either -1, 0 or 1.

      I'm not sure whether this is a documentation error or implementation bug though.

        Attachments

        For Gerrit Dashboard: QTBUG-42860
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            laknoll Lars Knoll
            Reporter:
            nilsson.troels@gmail.com Troels Nilsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes