diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-06-08 12:55:43 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-08-13 08:48:03 +0200 |
commit | 50c96c17b6c87d48418336dc124a6de3f1f1958b (patch) | |
tree | 962402f22076847ba61a1877a269bac8460beb3b /tests/auto/corelib/kernel | |
parent | 2002158a13517411ba797788331e8865cca514e5 (diff) |
Use the new support for comparisons in QMetaType for QVariant
Remove the compare method in the QVariant::Handler struct. Rely
on the generic support provided by QMetaType instead.
[ChangeLog][Important Behavior Changes][QVariant] QVariant will now use builtin support in
QMetaType to compare its content. This implies a behavioral change
for some graphical types like QPixmap, QImage and QIcon that will
never compare equal in Qt 6 (as they do not have a comparison
operator).
Change-Id: I30a6e7116c89124d11ed9052537cecc23f78116e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/corelib/kernel')
-rw-r--r-- | tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index a41af75f72..040fb474e7 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -187,7 +187,6 @@ private slots: void operator_eq_eq_data(); void operator_eq_eq(); - void operator_eq_eq_rhs(); void typeName_data(); void typeName(); @@ -1676,22 +1675,6 @@ void tst_QVariant::operator_eq_eq() QCOMPARE( left == right, equal ); } -void tst_QVariant::operator_eq_eq_rhs() -{ - QVariant v = 42; - - QVERIFY(v == 42); - QVERIFY(42 == v); - -#if 0 - /* This should _not_ compile */ - QStringList list; - QDateTime dt; - - QVERIFY(dt == list); -#endif -} - void tst_QVariant::typeName_data() { QTest::addColumn<int>("type"); |