diff options
Diffstat (limited to 'src/corelib/thread/qthread.cpp')
| -rw-r--r-- | src/corelib/thread/qthread.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index 870689f4d0c..9d42c5dc02a 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -483,11 +483,8 @@ QThread::~QThread() Q_D(QThread); { QMutexLocker locker(&d->mutex); - if (d->threadState == QThreadPrivate::Finishing) { - locker.unlock(); - wait(); - locker.relock(); - } + if (d->threadState == QThreadPrivate::Finishing) + d->wait(locker, QDeadlineTimer::Forever); if (d->threadState == QThreadPrivate::Running && !d->data->isAdopted) qFatal("QThread: Destroyed while thread '%ls' is still running", qUtf16Printable(objectName())); |
