File: 1001_fix-qtdatetime-null-comparison.patch

package info (click to toggle)
qtcontacts-sqlite 0.3.20-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,952 kB
  • sloc: cpp: 32,880; ansic: 1,269; xml: 62; makefile: 32; sh: 18
file content (18 lines) | stat: -rw-r--r-- 966 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: tests/auto/qcontactmanager/tst_qcontactmanager.cpp: Fix unit test when building against Qt 5.14 or higher.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Abstract:
 Compare a QDateTime object of NULL against any instatiated QDateTime
 object will always result as '<=' since Qt 5.14.
Forwarded: https://gitlab.com/ubports/development/core/qtcontacts-sqlite/-/merge_requests/9

--- a/tests/auto/qcontactmanager/tst_qcontactmanager.cpp
+++ b/tests/auto/qcontactmanager/tst_qcontactmanager.cpp
@@ -4621,7 +4621,7 @@
     QTest::newRow("datetimes dt5 = dt5") << QVariant(dt5) << QVariant(dt5) << Qt::CaseInsensitive << 0;
 
     // Uninitialized datetime now compares as the epoch date
-    QTest::newRow("datetimes dt0 > dt1") << QVariant(dt0) << QVariant(dt1) << Qt::CaseInsensitive << 1;
+    QTest::newRow("datetimes dt0 < dt1") << QVariant(dt0) << QVariant(dt1) << Qt::CaseInsensitive << -1;
 }
 
 void tst_QContactManager::createCollection()