summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-08-23 14:41:32 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-08-30 18:41:29 +0000
commit1a09c599b38b5922e9823d0ce37af6d245a690ed (patch)
tree467bbc60ac8ee57cd143b17c291e456cf9450e0d /src/corelib/kernel
parent1d0d5aaeb54f6dd83f70014fc6d1be0e380c4a52 (diff)
QDeadlineTimer: inline the isForever function
The constructor that sets it is inline already, so there's no point in hiding this. Change-Id: I66707fdfe8eb460a9c72fffd146d8dbc35b13056 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qdeadlinetimer.cpp6
-rw-r--r--src/corelib/kernel/qdeadlinetimer.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/src/corelib/kernel/qdeadlinetimer.cpp b/src/corelib/kernel/qdeadlinetimer.cpp
index 7906b29ece..957d985c31 100644
--- a/src/corelib/kernel/qdeadlinetimer.cpp
+++ b/src/corelib/kernel/qdeadlinetimer.cpp
@@ -408,16 +408,14 @@ void QDeadlineTimer::setPreciseRemainingTime(qint64 secs, qint64 nsecs, Qt::Time
*/
/*!
+ \fn bool QDeadlineTimer::isForever() const
+
Returns true if this QDeadlineTimer object never expires, false otherwise.
For timers that never expire, remainingTime() always returns -1 and
deadline() returns the maximum value.
\sa ForeverConstant, hasExpired(), remainingTime()
*/
-bool QDeadlineTimer::isForever() const Q_DECL_NOTHROW
-{
- return t1 == (std::numeric_limits<qint64>::max)();
-}
/*!
Returns true if this QDeadlineTimer object has expired, false if there
diff --git a/src/corelib/kernel/qdeadlinetimer.h b/src/corelib/kernel/qdeadlinetimer.h
index ac8a09ba97..3b97b89359 100644
--- a/src/corelib/kernel/qdeadlinetimer.h
+++ b/src/corelib/kernel/qdeadlinetimer.h
@@ -65,7 +65,8 @@ public:
void swap(QDeadlineTimer &other)
{ qSwap(t1, other.t1); qSwap(t2, other.t2); qSwap(type, other.type); }
- bool isForever() const Q_DECL_NOTHROW;
+ Q_DECL_CONSTEXPR bool isForever() const Q_DECL_NOTHROW
+ { return t1 == (std::numeric_limits<qint64>::max)(); }
bool hasExpired() const Q_DECL_NOTHROW;
Qt::TimerType timerType() const Q_DECL_NOTHROW