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)
This commit is contained in:
Laszlo Agocs 2011-04-18 17:05:38 +02:00 committed by Olivier Goffart
parent dd646cd10e
commit dfebed5d5b

View File

@ -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;
}