Skip to content

Commit

Permalink
QTest::qWaitFor: make a comment terser
Browse files Browse the repository at this point in the history
...and adjust it to its presence in the new QDeadlineTimer overload,
which sports nanoseconds granularity.

Pick-to: 6.7
Change-Id: Ifa9658ca32c5dc4bef5cf36dec2e452174eebe1c
Reviewed-by: Ahmad Samir <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
  • Loading branch information
marcmutz committed Mar 14, 2024
1 parent 710eda7 commit dd5925f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/corelib/kernel/qtestsupport_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,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;

Expand Down

0 comments on commit dd5925f

Please sign in to comment.