QTest::qWaitFor(., int): restore lost Qt::PreciseTimer'ness
Before the qWaitFor() port from int to QDeadlineTimer, the
implementation constructed a QDeadlineTimer internally, passing int
timeout and Qt::PreciseTimer. The int overload that was retained for
source-compatibility, however, constructs the QDeadlineTimer without
the PreciseTimer flag, which is a behavior change.
Restore the Qt 6.6 behavior and pass Qt::PreciseTimer.
Amends fa296ee1dc.
Pick-to: 6.7 6.7.0
Change-Id: Ib8e5b912c74b70d32a77195edb0d2a30cd7c241d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
parent
097f0edc9f
commit
73c52ba268
|
|
@ -62,7 +62,7 @@ qWaitFor(Functor predicate, QDeadlineTimer deadline = QDeadlineTimer(std::chrono
|
|||
template <typename Functor>
|
||||
[[nodiscard]] static bool qWaitFor(Functor predicate, int timeout)
|
||||
{
|
||||
return qWaitFor(predicate, QDeadlineTimer(timeout));
|
||||
return qWaitFor(predicate, QDeadlineTimer{timeout, Qt::PreciseTimer});
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT void qWait(int ms);
|
||||
|
|
|
|||
Loading…
Reference in New Issue