summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_win.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-11-08 21:16:55 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-11-13 19:34:07 +0100
commitf2cf5f5417d4df68eb0677e375cb81e39286c05f (patch)
treece75f050fbd02cfd106471ddcf046e8e22b818fc /src/corelib/thread/qthread_win.cpp
parentf2cc6fd4a0734e442f1101e3277215ea9d44d0d2 (diff)
Port QThread::wait() to QDeadlineTimer
So we are in sync with QWaitCondition::wait(). Task-number: QTBUG-64266 Change-Id: I1d7487786513241cedd35d202c4ddee4937b08ec Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qthread_win.cpp')
-rw-r--r--src/corelib/thread/qthread_win.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index a72df2fc40..3df7080caf 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -610,7 +610,7 @@ void QThread::terminate()
QThreadPrivate::finish(this, false);
}
-bool QThread::wait(unsigned long time)
+bool QThread::wait(QDeadlineTimer deadline)
{
Q_D(QThread);
QMutexLocker locker(&d->mutex);
@@ -627,9 +627,9 @@ bool QThread::wait(unsigned long time)
bool ret = false;
#ifndef Q_OS_WINRT
- switch (WaitForSingleObject(d->handle, time)) {
+ switch (WaitForSingleObject(d->handle, deadline.remainingTime())) {
#else
- switch (WaitForSingleObjectEx(d->handle, time, false)) {
+ switch (WaitForSingleObjectEx(d->handle, deadline.remainingTime(), false)) {
#endif
case WAIT_OBJECT_0:
ret = true;