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

QString::localeAwareCompare() sorts incorrect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.8.0
    • 4.7.0
    • None
    • kubuntu 64 bit, german locale
    • 40a2129c60f21ea6f146d405ebcadb25628db273

    Description


      I originally posted this bug at bugs.kde.org/show_bug.cgi?id=255398 because kmail displays some names in wrong order. I was refered to this bugtracking page because localeAwareCompare() seems to be source of this issue. I am not into C++, so I could not check out if it really is a bug in localeAwareCompare(), but maybe someone of you could do that for me (and if it is, fix it).

      The Issue:

      A set of names like "Smith, Adam", "Smithers, Adam", "Smith, Eve" and "Smithers, Eve" should be sorted like this:

      1. "Smith, Adam"
      2. "Smith, Eve"
      3. "Smithers, Adam"
      4. "Smithers, Eve"

      But instead it is sorted like this:

      1. "Smith, Adam"
      2. "Smithers, Adam"
      3. "Smithers, Eve"
      4. "Smith, Eve"

      I assume, that whitespaces and commas (as well as other non alphanumeric characters) are ignored during comparison, so that "Smithers, Eve" and "Smith, Eve" becomes "smitherseve" and "smitheve" and thus be sorted the wrong way.

      Attachments

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

        Activity

          People

            liaqi Liang Qi
            conker Michael Grohn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes