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>
This commit is contained in:
parent
4266c54128
commit
550b8c342b
@ -848,8 +848,9 @@ void QCoreApplicationPrivate::init()
|
|||||||
|
|
||||||
#ifndef QT_NO_QOBJECT
|
#ifndef QT_NO_QOBJECT
|
||||||
// use the event dispatcher created by the app programmer (if any)
|
// use the event dispatcher created by the app programmer (if any)
|
||||||
if (!eventDispatcher)
|
Q_ASSERT(!eventDispatcher);
|
||||||
eventDispatcher = threadData->eventDispatcher.load();
|
eventDispatcher = threadData->eventDispatcher.load();
|
||||||
|
|
||||||
// otherwise we create one
|
// otherwise we create one
|
||||||
if (!eventDispatcher)
|
if (!eventDispatcher)
|
||||||
createEventDispatcher();
|
createEventDispatcher();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user