summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_symbian.cpp
diff options
context:
space:
mode:
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 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);
{