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

QUuid ordering changed between 6.7 and 6.8

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.8.0
    • Active Qt
    • None
    • Linux/Wayland, macOS

    Description

      The following code has different results in Qt 6.7.2 and Qt 6.8.0:

          auto lowerSessionId = QUuid::fromString(u"ca3cf894-5325-482f-a412-a6e9f832298d");
          auto higherSessionId = QUuid::fromString(u"fecbea35-08d3-404f-9ec7-2b57c566fa74");
          qDebug() << lowerSessionId.toString() << "<" << higherSessionId.toString() << (lowerSessionId < higherSessionId);
      
          QVERIFY(lowerSessionId < higherSessionId);
      

       

      Qt 6.7:

      Config: Using QtTest library 6.7.2, Qt 6.7.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 14.2.0), debian unknown
      QDEBUG : tst_QXmppJingleMessageInitiationManager::testHandleNonExistingSessionLowerId() "\{ca3cf894-5325-482f-a412-a6e9f832298d}" < "\{fecbea35-08d3-404f-9ec7-2b57c566fa74}" true
      PASS   : tst_QXmppJingleMessageInitiationManager::testHandleNonExistingSessionLowerId()}}
      

      Qt 6.8:

      Config: Using QtTest library 6.8.0, Qt 6.8.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 10.3.1 20210422 (Red Hat 10.3.1-1)), debian unknown
      QDEBUG : tst_QXmppJingleMessageInitiationManager::testHandleNonExistingSessionLowerId() "{ca3cf894-5325-482f-a412-a6e9f832298d}" < "\{fecbea35-08d3-404f-9ec7-2b57c566fa74}" false
      FAIL!  : tst_QXmppJingleMessageInitiationManager::testHandleNonExistingSessionLowerId() 'lowerSessionId < higherSessionId' returned FALSE. ()
      

      (and same behaviour on macOS on my CI)

      My expected behavior is that from Qt 6.7 as that would be the "i;octet" sorting also used in https://datatracker.ietf.org/doc/html/rfc4790.

      I think the documentation does not specify which QUuid is using, so maybe this change is legit, however I would have expected a changelog entry in this case.

      Attachments

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

        Activity

          People

            owolff Oliver Wolff
            lnj Linus Jahn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes