diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-12-29 18:59:04 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-06-22 07:14:35 +0000 |
commit | 99d4f0026f90681974f6fd1d23941e5b69024796 (patch) | |
tree | bca571109dc15922c8779c9eec9500967858455a /src/corelib/thread/qthread.h | |
parent | 31023ef553f3b26081f92a5d95a886f4d7cffdd9 (diff) |
Make the stub implementation of QThread compile again
We cannot inline methods of QThreadPrivate because QThreadData has to
be declared before. The global QThreadData needs to be accessible to
QThreadData::clearCurrentThreadData(), and QAdoptedThread::run() has to
be moved inside the #ifndef QT_NO_THREAD block as run() doesn't exist
in the stub and Q_DECL_OVERRIDE would be wrong.
We also fix the QThreadData::current() method to take and use the same
parameters as in the non-stub case.
Change-Id: Id29ca44b11fa95ed2df7cc39243a07ce7d3c455e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/corelib/thread/qthread.h')
-rw-r--r-- | src/corelib/thread/qthread.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h index 19951e844a..83c3329cc0 100644 --- a/src/corelib/thread/qthread.h +++ b/src/corelib/thread/qthread.h @@ -251,6 +251,9 @@ public: static void msleep(unsigned long); static void usleep(unsigned long); + QAbstractEventDispatcher *eventDispatcher() const; + void setEventDispatcher(QAbstractEventDispatcher *eventDispatcher); + protected: QThread(QThreadPrivate &dd, QObject *parent = nullptr); |