summaryrefslogtreecommitdiffstats
path: root/src/corelib/compat
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2023-05-23 15:59:40 +0200
committerIvan Solovev <ivan.solovev@qt.io>2023-11-28 21:30:52 +0100
commit5839aed9bdf0e44398e729c8371935d9bfe8cd87 (patch)
tree9e2495bb1d4ceb2e76e8c50e20e4106770d74e6f /src/corelib/compat
parentff04c24184c103aab9e56f8adac70784db9ef6c5 (diff)
QDateTime: use new comparison helper macros
The unit-tests were already ported to the new comparison helper functions from QTestPrivate. Task-number: QTBUG-104111 Change-Id: I95fccb33433b3bbf1167545e347a271140727f23 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/compat')
-rw-r--r--src/corelib/compat/removed_api.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp
index 99c08f1673..f8e6fa3a51 100644
--- a/src/corelib/compat/removed_api.cpp
+++ b/src/corelib/compat/removed_api.cpp
@@ -692,6 +692,11 @@ void QDateTime::setTimeZone(const QTimeZone &toZone)
setTimeZone(toZone, TransitionResolution::LegacyBehavior);
}
+bool QDateTime::precedes(const QDateTime &other) const
+{
+ return compareThreeWay(*this, other) < 0;
+}
+
#include "qdatastream.h"
QDataStream &QDataStream::readBytes(char *&s, uint &l)