summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-09 01:00:54 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-09 01:00:55 +0100
commit261c0dedac1d97b5960d27eedaa017d45050b654 (patch)
treef91c8e2a770f4c456f6465f28aecefc8c2bbeccf /src/corelib/thread
parent830e06a3f8173621a99426e7da6ad9704eb701b3 (diff)
parentcaa74f16d41ebe65e1edbea219f799cf246d6067 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthread.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index 05bc064005..b023ae9ed2 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -818,6 +818,16 @@ void QThread::quit()
}
+void QThread::exit(int returnCode)
+{
+ Q_D(QThread);
+ d->data->quitNow = true;
+ for (int i = 0; i < d->data->eventLoops.size(); ++i) {
+ QEventLoop *eventLoop = d->data->eventLoops.at(i);
+ eventLoop->exit(returnCode);
+ }
+}
+
bool QThread::wait(unsigned long time)
{
Q_UNUSED(time);