summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-02-13 14:47:18 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-02-14 10:34:03 +0000
commit550b8c342b32e518f79250620eaefd4714a873a1 (patch)
tree316c7d965c9382965f88b62b0f987c837cc0eb16 /src/corelib/kernel/qcoreapplication.cpp
parent4266c541284c9ba4e490c0b0b6ae0ef709fc01fe (diff)
Don't expect QCoreApplictionPrivate::eventDispatcher to be set
QCoreApplication::setEventDispatcher sets the dispatcher on the current thread, not on QCoreApplictionPrivate, so when running init() we don't have an event dispatcher set. Change-Id: Ia008e68b70777779ab14f1f7b9eeadac9adbcf7b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.cpp')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 4bab0b9f01..b56031e625 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -848,8 +848,9 @@ void QCoreApplicationPrivate::init()
#ifndef QT_NO_QOBJECT
// use the event dispatcher created by the app programmer (if any)
- if (!eventDispatcher)
- eventDispatcher = threadData->eventDispatcher.load();
+ Q_ASSERT(!eventDispatcher);
+ eventDispatcher = threadData->eventDispatcher.load();
+
// otherwise we create one
if (!eventDispatcher)
createEventDispatcher();