Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.0.0
-
None
Description
At present, the following expression returns true:
QVariant(int(0)) == QVariant(QVariant::Int)
(The latter creates a "null" QVariant.)
If this behaviour is intentional, the QVariant autotest (qtbase/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp) should be changed to eliminate the QEXPECT_FAIL call in the operator_eq_eq() test function (e.g. by checking isNull() also).
If the above behaviour is not intentional, the QVariant implementation should be corrected, which would also result in the QEXPECT_FAIL call being eliminated from the test.
In either case, the documentation should be updated to clarify the expected behaviour of null QVariants.
Attachments
For Gerrit Dashboard: QTBUG-22933 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
35513,3 | Make documentation of QVariant::isNull more explicit. | master | qt/qtbase | Status: MERGED | +2 | 0 |