summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_symbian.cpp
diff options
context:
space:
mode:
authorSami Lempinen <sami.lempinen@nokia.com>2011-04-28 08:10:57 (GMT)
committerSami Lempinen <sami.lempinen@nokia.com>2011-04-28 08:10:57 (GMT)
commit95de3f34d9dba4cd95f1f3d32b35c4a4d97e70d9 (patch)
tree7be35a9028b5c83b792190fb954127e9f558baf5 /src/corelib/thread/qthread_symbian.cpp
parent9d6530b9774de482b0b3a29720f7f756e986f5c7 (diff)
parent8e615d9b07f6146b5cb6b56c4cd2e32376a8b429 (diff)
downloadQt-95de3f34d9dba4cd95f1f3d32b35c4a4d97e70d9.zip
Qt-95de3f34d9dba4cd95f1f3d32b35c4a4d97e70d9.tar.gz
Qt-95de3f34d9dba4cd95f1f3d32b35c4a4d97e70d9.tar.bz2
Merge remote-tracking branch 'qt/4.8'
Diffstat (limited to 'src/corelib/thread/qthread_symbian.cpp')
-rw-r--r--src/corelib/thread/qthread_symbian.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_symbian.cpp b/src/corelib/thread/qthread_symbian.cpp
index 436c105..665aadd 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);
{