summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qthread_p.h')
-rw-r--r--src/corelib/thread/qthread_p.h77
1 files changed, 32 insertions, 45 deletions
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index 0bf773c..c575005 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -111,51 +111,6 @@ public:
{ }
};
-class Q_CORE_EXPORT QThreadData
-{
- QAtomicInt _ref;
-
-public:
- QThreadData(int initialRefCount = 1);
- ~QThreadData();
-
- static QThreadData *current();
- static QThreadData *get2(QThread *thread);
-
- void ref();
- void deref();
-
- QThread *thread;
- bool quitNow;
- int loopLevel;
- QAbstractEventDispatcher *eventDispatcher;
- QStack<QEventLoop *> eventLoops;
- QPostEventList postEventList;
- bool canWait;
- QMap<int, void *> tls;
-
- QMutex mutex;
-
-# ifdef Q_OS_SYMBIAN
- RThread symbian_thread_handle;
-# endif
-};
-
-// thread wrapper for the main() thread
-class QAdoptedThread : public QThread
-{
- Q_DECLARE_PRIVATE(QThread)
-
-public:
- QAdoptedThread(QThreadData *data = 0);
- ~QAdoptedThread();
- void init();
-
- static QThread *createThreadForAdoption();
-private:
- void run();
-};
-
#ifndef QT_NO_THREAD
class QThreadPrivate : public QObjectPrivate
{
@@ -224,6 +179,38 @@ public:
#endif // QT_NO_THREAD
+class QThreadData
+{
+ QAtomicInt _ref;
+
+public:
+ QThreadData(int initialRefCount = 1);
+ ~QThreadData();
+
+ static QThreadData *current();
+ static QThreadData *get2(QThread *thread)
+ { Q_ASSERT_X(thread != 0, "QThread", "internal error"); return thread->d_func()->data; }
+
+
+ void ref();
+ void deref();
+
+ QThread *thread;
+ bool quitNow;
+ int loopLevel;
+ QAbstractEventDispatcher *eventDispatcher;
+ QStack<QEventLoop *> eventLoops;
+ QPostEventList postEventList;
+ bool canWait;
+ QMap<int, void *> tls;
+
+ QMutex mutex;
+
+# ifdef Q_OS_SYMBIAN
+ RThread symbian_thread_handle;
+# endif
+};
+
QT_END_NAMESPACE
#endif // QTHREAD_P_H