diff options
| author | Ahmad Samir <a.samirh78@gmail.com> | 2023-03-05 00:13:32 +0200 |
|---|---|---|
| committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-06-30 02:24:53 +0300 |
| commit | 57712e1160dd2bd37e8a0838cf0298b740a96983 (patch) | |
| tree | 0d668885e8fbb4c8b9971d499e490bc48c90a2be /src/testlib/doc/snippets/code/code.pro | |
| parent | c580a7b0fa09473fb6afaf3416c858b71171ad48 (diff) | |
QTest: add qWait(chrono::milliseconds) overload
The code bailed out of the while loop when "remainingTime <= 0",
for a QDeadlineTimer::isForever() timer remainingTime() returns -1,
whereas remainingTimeAsDuration() returns nanoseconds::max().
I.e. the original code stopped the while loop when the timer isForever()
or "expired" (i.e. remaining time is 0). I am not sure the isForever()
part was intended that way or not, but it makes sense, if
QCoreApplication::processEvents() has already run "forever", there is no
point looping again.
[ChangeLog][QtCore][QTest] Added qWait(chrono::milliseconds) overload.
Change-Id: I871c28b053c6ba4f81a7e2d434aa4fbe03c8c5e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/testlib/doc/snippets/code/code.pro')
0 files changed, 0 insertions, 0 deletions
