diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-08 12:55:54 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-08 14:23:30 (GMT) |
commit | 168f75927390d4ab726870946d60604abf994654 (patch) | |
tree | 9c0ff68b880dc00d9695b5addb9991afda787020 /src/corelib/thread/qthread_p.h | |
parent | c7296d97ae0dc92b2383dfd47e1f85aa570d5d0c (diff) | |
download | Qt-168f75927390d4ab726870946d60604abf994654.zip Qt-168f75927390d4ab726870946d60604abf994654.tar.gz Qt-168f75927390d4ab726870946d60604abf994654.tar.bz2 |
Small simplification on code
Diffstat (limited to 'src/corelib/thread/qthread_p.h')
-rw-r--r-- | src/corelib/thread/qthread_p.h | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h index 75293ce..eb290db 100644 --- a/src/corelib/thread/qthread_p.h +++ b/src/corelib/thread/qthread_p.h @@ -107,32 +107,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; -}; - #ifndef QT_NO_THREAD class QThreadPrivate : public QObjectPrivate { @@ -210,6 +184,34 @@ 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; +}; + QT_END_NAMESPACE #endif // QTHREAD_P_H |