Commit 550b8c34 authored by Tor Arne Vestbø's avatar Tor Arne Vestbø
Browse files

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: default avatarThiago Macieira <thiago.macieira@intel.com>
Reviewed-by: default avatarTor Arne Vestbø <tor.arne.vestbo@qt.io>
Showing with 3 additions and 2 deletions
......@@ -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();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment