summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-07-06 13:33:11 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-07-14 04:20:05 +0000
commit56d52e1f1a8709520b62b558121237686acf5fae (patch)
treef6a2390da6a34d30595744fbf545271d4264aa81 /src/corelib/thread/qthread.cpp
parentf6425da424b1a0d5927ee56fa657a9b31ca5afd1 (diff)
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 <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qthread.cpp')
-rw-r--r--src/corelib/thread/qthread.cpp8
1 files changed, 8 insertions, 0 deletions
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
*/