summaryrefslogtreecommitdiffstats
path: root/tests/auto/contacts/qcontactmanager/tst_qcontactmanager.cpp
diff options
context:
space:
mode:
authorChris Adams <chris.adams@qinetic.com.au>2020-10-16 11:26:20 +1000
committerChris Adams <chris.adams@qinetic.com.au>2020-11-02 13:19:24 +1000
commit0d7a97f0717cef8a16cdba6b37de860a531f9407 (patch)
treeec22cf720626511214e18f765475da49365e570f /tests/auto/contacts/qcontactmanager/tst_qcontactmanager.cpp
parent5679a6141c76ae7d64c3acc8a87b1adb048289e0 (diff)
Adapt to Qt6 behavior changes
- QVariant comparison now doesn't perform type conversion - Null QDateTime now compares less than other QDateTime values, rather than being equal to epoch. - Sequence type name is printed by default in warnings - QMultiHash::operator==() can return false for empty hashes in some cases (QTBUG-87575) - QJsonValue will expose input like "2.0" as an integral type as the value can be perfectly expressed as an integral (QTBUG-87443) Change-Id: I848888ecc74b5fb790488181a0d62a04138fcd81 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
Diffstat (limited to 'tests/auto/contacts/qcontactmanager/tst_qcontactmanager.cpp')
-rw-r--r--tests/auto/contacts/qcontactmanager/tst_qcontactmanager.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/auto/contacts/qcontactmanager/tst_qcontactmanager.cpp b/tests/auto/contacts/qcontactmanager/tst_qcontactmanager.cpp
index a46cf97a9..6599db41f 100644
--- a/tests/auto/contacts/qcontactmanager/tst_qcontactmanager.cpp
+++ b/tests/auto/contacts/qcontactmanager/tst_qcontactmanager.cpp
@@ -3512,9 +3512,7 @@ void tst_QContactManager::compareVariant_data()
QDateTime dt4(d5, t1);
QDateTime dt5(d6, t4); // end of the universe
- // Note: this test used to verify that null QDateTime compared less than a non-null date prior to 1AD
- // The current Qt behavior is to compare null as the UNIX epoch, so we will follow that
- QTest::newRow("datetimes dt0 > dt1") << QVariant(dt0) << QVariant(dt1) << Qt::CaseInsensitive << 1;
+ QTest::newRow("datetimes dt0 > dt1") << QVariant(dt0) << QVariant(dt1) << Qt::CaseInsensitive << -1;
QTest::newRow("datetimes dt1 < dt2") << QVariant(dt1) << QVariant(dt2) << Qt::CaseInsensitive << -1;
QTest::newRow("datetimes dt2 < dt3") << QVariant(dt2) << QVariant(dt3) << Qt::CaseInsensitive << -1;
QTest::newRow("datetimes dt3 < dt4") << QVariant(dt3) << QVariant(dt4) << Qt::CaseInsensitive << -1;