diff options
author | David Boddie <dboddie@trolltech.com> | 2009-08-26 12:35:45 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-08-26 12:35:45 (GMT) |
commit | 7e30c92186878beb300a13093c3668ae8a10f2be (patch) | |
tree | 313aa7f7a8345e65b7803bae1cb68ad866bdadbc /src/corelib/thread/qthread.h | |
parent | b98042831f4f6f6c5844965731b2dd64f27c076e (diff) | |
parent | aeb4251c76560a070ce22320be00e860950b4668 (diff) | |
download | Qt-7e30c92186878beb300a13093c3668ae8a10f2be.zip Qt-7e30c92186878beb300a13093c3668ae8a10f2be.tar.gz Qt-7e30c92186878beb300a13093c3668ae8a10f2be.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/corelib/thread/qthread.h')
-rw-r--r-- | src/corelib/thread/qthread.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h index 8b26251..9707d6f 100644 --- a/src/corelib/thread/qthread.h +++ b/src/corelib/thread/qthread.h @@ -142,15 +142,18 @@ class Q_CORE_EXPORT QThread : public QObject { public: static Qt::HANDLE currentThreadId() { return Qt::HANDLE(currentThread()); } - static QThread* currentThread() - { if (!instance) instance = new QThread(); return instance; } + static QThread* currentThread(); + +protected: + QThread(QThreadPrivate &dd, QObject *parent = 0); private: - QThread(); + explicit QThread(QObject *parent = 0); static QThread *instance; friend class QCoreApplication; friend class QThreadData; + friend class QAdoptedThread; Q_DECLARE_PRIVATE(QThread) }; |