summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-02-13 14:37:05 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-02-14 14:18:09 +0000
commit54d57cbd6fe9c6f668bb42f02f2674239359e6fd (patch)
tree945f2af28123320f63998f56a560d2af44c1b329 /src/corelib/kernel
parentfe5edcee602f0ab2912bbdd1a21f4309ed7dbfd6 (diff)
Make QThreadPrivate::createEventDispatcher do exactly what it says
Leaving the logic of starting up the event dispatcher to the call site, unified both the case of a custom event dispatcher and the default event dispatcher. The data argument is left in due to the static nature of the function. Change-Id: Ia2020e39ccc67cd5a583d4e614dd978b2ec44dba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qeventloop.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/kernel/qeventloop.cpp b/src/corelib/kernel/qeventloop.cpp
index 3e2326343b..6034698349 100644
--- a/src/corelib/kernel/qeventloop.cpp
+++ b/src/corelib/kernel/qeventloop.cpp
@@ -102,7 +102,9 @@ QEventLoop::QEventLoop(QObject *parent)
if (!QCoreApplication::instance() && QCoreApplicationPrivate::threadRequiresCoreApplication()) {
qWarning("QEventLoop: Cannot be used without QApplication");
} else if (!d->threadData->hasEventDispatcher()) {
- QThreadPrivate::createEventDispatcher(d->threadData);
+ QAbstractEventDispatcher *eventDispatcher = QThreadPrivate::createEventDispatcher(d->threadData);
+ d->threadData->eventDispatcher.storeRelease(eventDispatcher);
+ eventDispatcher->startingUp();
}
}