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

Error in operator checks for equality class QVariant as a null QUuid

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.5.0
    • 5.2.1
    • None
    • qt-opensource-windows-x86-mingw48_opengl-5.2.1.exe
    • 849604e2f98296ddcde4f1e323e2383ef4f0dd49

    Description

      Strange behavior:

      main.cpp
      #include <QDebug>
      #include <QUuid>
      #include <QVariant>
      
      
      int main()
      {
          QUuid u1 = QUuid();
          QVariant v1 = u1;
      
          QUuid u2 = u1;
          QString s2 = u2.toString();
          QVariant v2 = s2;
      
          qDebug() << (v1 == v2); // true
          qDebug() << (v2 == v1); // false
      
          return 0;
      }
      

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            anekename Sergey Bartosh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes