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

QCollator::compare returns values outside its documented range

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.3.2
    • None
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            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