From 56d52e1f1a8709520b62b558121237686acf5fae Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 6 Jul 2018 13:33:11 -0700 Subject: QThread: Centralize the creation of the event dispatcher In some places we call startingUp(), in others we don't. It's probably ok for those that have just created an object of a given class, which knows whether the virtual call is necessary or not. But for the generic case, we do call it. Change-Id: If48c5c2e920c433298f1fffd153ee1cc75703204 Reviewed-by: Friedemann Kleint Reviewed-by: Thiago Macieira --- src/corelib/thread/qthread.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/corelib/thread/qthread.cpp') diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index c21877485f..472c6f6795 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -117,6 +117,14 @@ void QThreadData::deref() #endif } +QAbstractEventDispatcher *QThreadData::createEventDispatcher() +{ + QAbstractEventDispatcher *ed = QThreadPrivate::createEventDispatcher(this); + eventDispatcher.storeRelease(ed); + ed->startingUp(); + return ed; +} + /* QAdoptedThread */ -- cgit v1.2.3