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

== operator for QVariant not behaving as expected

    XMLWordPrintable

Details

    • Windows

    Description

      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. 

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes