diff options
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qthread_p.h | 2 | ||||
-rw-r--r-- | src/corelib/thread/qthread_unix.cpp | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h index f07fad8..0bf773c 100644 --- a/src/corelib/thread/qthread_p.h +++ b/src/corelib/thread/qthread_p.h @@ -182,7 +182,7 @@ public: static void *start(void *arg); #if defined(Q_OS_SYMBIAN) - static void finish(void *arg, bool lockAnyway=true); + static void finish(void *arg, bool lockAnyway=true, bool closeNativeHandle=true); #else static void finish(void *); #endif diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index aad55bc..567c936 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -226,7 +226,7 @@ void *QThreadPrivate::start(void *arg) } #ifdef Q_OS_SYMBIAN -void QThreadPrivate::finish(void *arg, bool lockAnyway) +void QThreadPrivate::finish(void *arg, bool lockAnyway, bool closeNativeHandle) #else void QThreadPrivate::finish(void *arg) #endif @@ -258,7 +258,8 @@ void QThreadPrivate::finish(void *arg) d->thread_id = 0; #ifdef Q_OS_SYMBIAN - d->data->symbian_thread_handle.Close(); + if (closeNativeHandle) + d->data->symbian_thread_handle.Close(); #endif d->thread_done.wakeAll(); #ifdef Q_OS_SYMBIAN @@ -530,10 +531,11 @@ void QThread::terminate() d->terminatePending = true; return; } - - d->data->symbian_thread_handle.Terminate(KErrNone); - + d->terminated = true; + QThreadPrivate::finish(this, false, false); + d->data->symbian_thread_handle.Terminate(KErrNone); + d->data->symbian_thread_handle.Close(); #endif |