QTest::qWaitFor: make a comment terser
...and adjust it to its presence in the new QDeadlineTimer overload, which sports nanoseconds granularity. Change-Id: Ifa9658ca32c5dc4bef5cf36dec2e452174eebe1c Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit dd5925fedb19c8fdb2601ec9eab6fb916341ff47) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
ffe0f48f52
commit
b75704a519
@ -25,9 +25,8 @@ qWaitFor(Functor predicate, QDeadlineTimer deadline = QDeadlineTimer(std::chrono
|
||||
if (predicate())
|
||||
return true;
|
||||
|
||||
// qWait() is expected to spin the event loop, even when called with a small
|
||||
// timeout like 1ms, so we we can't use a simple while-loop here based on
|
||||
// the deadline timer not having timed out. Use do-while instead.
|
||||
// qWait() is expected to spin the event loop at least once, even when
|
||||
// called with a small timeout like 1ns.
|
||||
|
||||
using namespace std::chrono;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user