From dfebed5d5b5b1e1b772f183687eaa09c680dbe16 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 18 Apr 2011 17:05:38 +0200 Subject: [PATCH] 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) --- src/corelib/thread/qthread_symbian.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corelib/thread/qthread_symbian.cpp b/src/corelib/thread/qthread_symbian.cpp index 5d8b5cb..665aadd 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; } -- 2.7.4