diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2023-05-16 18:08:22 +0200 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2023-11-28 21:30:40 +0100 |
commit | a6f4e55b4d80e8269d4419a66dd4ddc0ff60647f (patch) | |
tree | a93dbe591e6299b9149a26dd56aaa4d702f46908 /src/corelib/time/qdatetime.cpp | |
parent | 96f494bf92d246b741b6ae6261c93ef557ef392b (diff) |
QDate: use new comparison helper macros
Comparison with std::chrono types is also supported due to implicit
QDate constructors, which were made constexpr and noexcept in the
previous patch.
The unit-tests were already ported to the new comparison helper
functions from QTestPrivate.
Task-number: QTBUG-104111
Change-Id: Ib6b1122af9eaf2cb2c9db768150a31cf3bcadcc0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/time/qdatetime.cpp')
-rw-r--r-- | src/corelib/time/qdatetime.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp index d1b07df07d..3651aaa9d7 100644 --- a/src/corelib/time/qdatetime.cpp +++ b/src/corelib/time/qdatetime.cpp @@ -1555,14 +1555,14 @@ qint64 QDate::daysTo(QDate d) const /*! - \fn bool QDate::operator==(QDate lhs, QDate rhs) + \fn bool QDate::operator==(const QDate &lhs, const QDate &rhs) Returns \c true if \a lhs and \a rhs represent the same day, otherwise \c false. */ /*! - \fn bool QDate::operator!=(QDate lhs, QDate rhs) + \fn bool QDate::operator!=(const QDate &lhs, const QDate &rhs) Returns \c true if \a lhs and \a rhs represent distinct days; otherwise returns \c false. @@ -1571,26 +1571,26 @@ qint64 QDate::daysTo(QDate d) const */ /*! - \fn bool QDate::operator<(QDate lhs, QDate rhs) + \fn bool QDate::operator<(const QDate &lhs, const QDate &rhs) Returns \c true if \a lhs is earlier than \a rhs; otherwise returns \c false. */ /*! - \fn bool QDate::operator<=(QDate lhs, QDate rhs) + \fn bool QDate::operator<=(const QDate &lhs, const QDate &rhs) Returns \c true if \a lhs is earlier than or equal to \a rhs; otherwise returns \c false. */ /*! - \fn bool QDate::operator>(QDate lhs, QDate rhs) + \fn bool QDate::operator>(const QDate &lhs, const QDate &rhs) Returns \c true if \a lhs is later than \a rhs; otherwise returns \c false. */ /*! - \fn bool QDate::operator>=(QDate lhs, QDate rhs) + \fn bool QDate::operator>=(const QDate &lhs, const QDate &rhs) Returns \c true if \a lhs is later than or equal to \a rhs; otherwise returns \c false. |