summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_symbian.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-04-18 17:05:38 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-10 12:54:48 +0200
commitdfebed5d5b5b1e1b772f183687eaa09c680dbe16 (patch)
tree9e253dddddb8caf1245813b648f276475fbd302b /src/corelib/thread/qthread_symbian.cpp
parentdd646cd10e75b8427c52e7835e9f6a0bb9c117df (diff)
Create a cleanup stack for each new thread on Symbian.
The native thread implementation in Qt 4.8 did not call CTrapCleanup::New() which resulted in E32USER-CBASE 69 panics in applications when they tried to use the cleanup stack in a thread's run() function. In 4.7 this was working because OpenC's pthread implementation created a CTrapCleanup automatically. Now we do it also in the native Symbian thread implementation. Trask-number: QTBUG-18822 Reviewed-by: Murray Read (cherry picked from commit 41aa023ef6019ac9745b780c953f48b8bbc42a42)
Diffstat (limited to 'src/corelib/thread/qthread_symbian.cpp')
-rw-r--r--src/corelib/thread/qthread_symbian.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_symbian.cpp b/src/corelib/thread/qthread_symbian.cpp
index 5d8b5cbf0d..665aadd3a4 100644
--- a/src/corelib/thread/qthread_symbian.cpp
+++ b/src/corelib/thread/qthread_symbian.cpp
@@ -329,6 +329,8 @@ void *QThreadPrivate::start(void *arg)
data->quitNow = thr->d_func()->exited;
}
+ CTrapCleanup *cleanup = CTrapCleanup::New();
+
// ### TODO: allow the user to create a custom event dispatcher
createEventDispatcher(data);
@@ -337,6 +339,8 @@ void *QThreadPrivate::start(void *arg)
QThreadPrivate::finish(arg);
+ delete cleanup;
+
return 0;
}