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

Incorrect comaprison result in QString::localeAwareCompare method for Symbian release

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.8.0
    • 4.7.1
    • None
    • 05d8caa4c42b5539d993a898830307c21cb942b6

    Description

      Following test will be failed in Qt 4.7 release on Symbian platform

      QString s1("\xe5");
      QString s2("\xe4");
      int testres = QString::localeAwareCompare(s1, s2);
      QVERIFY(testres > 0);
      

      Qt considers that s2 > s1.
      qt\tests\auto\qstring test will be failed due the similar code.

      The problem is in new code added into QString::localeAwareCompare_helper method against 4.6:

      #elif defined(Q_OS_SYMBIAN)
      TPtrC p1 = TPtrC16(reinterpret_cast<const TUint16 *>(data1), length1);
      TPtrC p2 = TPtrC16(reinterpret_cast<const TUint16 *>(data2), length2);
      return p1.CompareC(p2);
      

      Attachments

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

        Activity

          People

            cduclos Carlos Duclos (Inactive)
            vasyura Oleh Vasyura
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes