diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-25 13:10:21 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-27 12:49:39 +0100 |
commit | dc77b86be5010ef639d8222c4cb1866379101b5b (patch) | |
tree | cbb0ce892bc76279f66976038987c2b0bdeb1735 /src/corelib/kernel/qelapsedtimer.cpp | |
parent | f8a83fc5c0aee1290a3e6b9a64ea3d50a07ee71d (diff) |
Make QElapsedTimer comparison operators hidden friends
Reduce ADL noise.
Clean up documentation and parameter naming a bit, while at it.
Change-Id: Ie9eb2a63b8e87a9ffc019b8fff5bd1c6bafaaf43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qelapsedtimer.cpp')
-rw-r--r-- | src/corelib/kernel/qelapsedtimer.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/corelib/kernel/qelapsedtimer.cpp b/src/corelib/kernel/qelapsedtimer.cpp index 662b9968be..af26a523c0 100644 --- a/src/corelib/kernel/qelapsedtimer.cpp +++ b/src/corelib/kernel/qelapsedtimer.cpp @@ -213,15 +213,24 @@ QT_BEGIN_NAMESPACE */ /*! - \fn bool QElapsedTimer::operator ==(const QElapsedTimer &other) const + \fn bool QElapsedTimer::operator==(const QElapsedTimer &lhs, const QElapsedTimer &rhs) noexcept - Returns \c true if this object and \a other contain the same time. + Returns \c true if \a lhs and \a rhs contain the same time, false otherwise. */ +/*! + \fn bool QElapsedTimer::operator!=(const QElapsedTimer &lhs, const QElapsedTimer &rhs) noexcept + Returns \c true if \a lhs and \a rhs contain different times, false otherwise. +*/ /*! - \fn bool QElapsedTimer::operator !=(const QElapsedTimer &other) const + \fn bool operator<(const QElapsedTimer &lhs, const QElapsedTimer &rhs) noexcept + \relates QElapsedTimer + + Returns \c true if \a lhs was started before \a rhs, false otherwise. - Returns \c true if this object and \a other contain different times. + The returned value is undefined if one of the two parameters is invalid + and the other isn't. However, two invalid timers are equal and thus this + function will return false. */ static const qint64 invalidData = Q_INT64_C(0x8000000000000000); |