summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qdeadlinetimer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qdeadlinetimer.h')
-rw-r--r--src/corelib/kernel/qdeadlinetimer.h3
1 files changed, 2 insertions, 1 deletions
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