summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread.h
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2018-07-02 22:24:35 +0200
committerLorn Potter <lorn.potter@gmail.com>2018-08-17 00:35:03 +0000
commit67352c92761fcb2e2c6a98b24e1bf5f33805cb3a (patch)
tree6d085f8ef3556469891bef40e23660d84cf767ec /src/corelib/thread/qthread.h
parent0a06e1baf9e6da5308582b9dc928f4d9fea508d0 (diff)
Merge QThread class definitions
We can reuse the main QThread definition for the no-thread configuration and avoid having to keep them in sync. Add stub definitions for member functions where needed. Change-Id: I128db11684a6040d09c4a4ce114f1399cba523f8 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/corelib/thread/qthread.h')
-rw-r--r--src/corelib/thread/qthread.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h
index d0ffd9f909..b6c5bf47d0 100644
--- a/src/corelib/thread/qthread.h
+++ b/src/corelib/thread/qthread.h
@@ -66,7 +66,6 @@ class QThreadData;
class QThreadPrivate;
class QAbstractEventDispatcher;
-#if QT_CONFIG(thread)
class Q_CORE_EXPORT QThread : public QObject
{
Q_OBJECT
@@ -239,36 +238,6 @@ QThread *QThread::create(Function &&f)
#endif // QT_CONFIG(cxx11_future)
-#else // QT_CONFIG(thread)
-
-class Q_CORE_EXPORT QThread : public QObject
-{
-public:
- static Qt::HANDLE currentThreadId() { return Qt::HANDLE(currentThread()); }
- static QThread* currentThread();
-
- static void sleep(unsigned long);
- static void msleep(unsigned long);
- static void usleep(unsigned long);
-
- QAbstractEventDispatcher *eventDispatcher() const;
- void setEventDispatcher(QAbstractEventDispatcher *eventDispatcher);
-
-protected:
- QThread(QThreadPrivate &dd, QObject *parent = nullptr);
-
-private:
- explicit QThread(QObject *parent = nullptr);
- static QThread *instance;
-
- friend class QCoreApplication;
- friend class QThreadData;
- friend class QAdoptedThread;
- Q_DECLARE_PRIVATE(QThread)
-};
-
-#endif // QT_CONFIG(thread)
-
QT_END_NAMESPACE
#endif // QTHREAD_H