summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-12-13 13:41:16 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-12-13 14:28:33 (GMT)
commitd5fe82b2ab939727f573429605abd99c039a99d1 (patch)
tree92a54ba8ef4f3288d8b0ef926eaea75149a71522 /src/gui/kernel/qapplication_s60.cpp
parentaae8f8432856125c94d93a9849914a7c6a7ecc76 (diff)
downloadQt-d5fe82b2ab939727f573429605abd99c039a99d1.zip
Qt-d5fe82b2ab939727f573429605abd99c039a99d1.tar.gz
Qt-d5fe82b2ab939727f573429605abd99c039a99d1.tar.bz2
Fix crash when creating more than one QApplication in single test case
CBA pointer is stored in static variable and it wasn't cleaned up properly at QApplication destruction, which led to crash. Task-number: QTBUG-15915 Reviewed-by: Sami Merila Reviewed-by: Janne Koskinen
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 8596563..81fa4e6 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1633,6 +1633,13 @@ void qt_cleanup()
//Change mouse pointer back
S60->wsSession().SetPointerCursorMode(EPointerCursorNone);
+#ifdef Q_WS_S60
+ // Clear CBA
+ CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(0);
+ delete S60->buttonGroupContainer();
+ S60->setButtonGroupContainer(0);
+#endif
+
if (S60->qtOwnsS60Environment) {
// Restore the S60 framework trap handler. See qt_init().
User::SetTrapHandler(S60->s60InstalledTrapHandler);