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

== operator for QVariant not behaving as expected

XMLWordPrintable

    • Windows

      Unexpected behavior with QVariant == operator. 

      Like if we try to print the output of following code, 

      qDebug()<< (QVariant(false) == QVariant(""));        --------> true

      qDebug()<< (QVariant("") == QVariant(false));        ---------> false

      Issues with this:

      1. QVariant operator is not checking the types of arguments being compared. 
      2. The operator is not commutative. 

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

            thiago Thiago Macieira
            shmittal Shveta Mittal
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes