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>bb10
parent
1d0d5aaeb5
commit
1a09c599b3
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue