diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2011-04-28 09:11:42 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2011-04-28 09:11:42 (GMT) |
commit | e3aa9ad1a15505fb2ac8e51e4da4e219efc62e66 (patch) | |
tree | 184d13abc3c189b5d3f29b891909b426cac85132 /src/corelib/thread | |
parent | d8b933084ecc6ded6689f71ea6ca2e5fd339faf3 (diff) | |
parent | 8e615d9b07f6146b5cb6b56c4cd2e32376a8b429 (diff) | |
download | Qt-e3aa9ad1a15505fb2ac8e51e4da4e219efc62e66.zip Qt-e3aa9ad1a15505fb2ac8e51e4da4e219efc62e66.tar.gz Qt-e3aa9ad1a15505fb2ac8e51e4da4e219efc62e66.tar.bz2 |
Merge branch '4.8-upstream'
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qthread_symbian.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_symbian.cpp b/src/corelib/thread/qthread_symbian.cpp index 1474b36..5d8b5cb 100644 --- a/src/corelib/thread/qthread_symbian.cpp +++ b/src/corelib/thread/qthread_symbian.cpp @@ -113,6 +113,8 @@ QThreadData *QThreadData::current() } data->deref(); } + data->isAdopted = true; + data->threadId = QThread::currentThreadId(); if (!QCoreApplicationPrivate::theMainThread) QCoreApplicationPrivate::theMainThread = data->thread; } @@ -256,6 +258,13 @@ QCAddAdoptedThread* QCAddAdoptedThread::adoptedThreadAdder = 0; void QCAdoptedThreadMonitor::RunL() { + if (data->isAdopted) { + QThread *thread = data->thread; + Q_ASSERT(thread); + QThreadPrivate *thread_p = static_cast<QThreadPrivate *>(QObjectPrivate::get(thread)); + Q_ASSERT(!thread_p->finished); + thread_p->finish(thread); + } data->deref(); QCAddAdoptedThread::threadDied(); delete this; @@ -312,6 +321,7 @@ void *QThreadPrivate::start(void *arg) // attribute of the thread again once the app gains control in run() User::SetCritical(User::EProcessCritical); + data->threadId = QThread::currentThreadId(); set_thread_data(data); { |