summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorSatyam Bandarapu <ext-satyam.bandarapu@nokia.com>2012-01-13 15:15:45 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-01-13 15:51:50 (GMT)
commit8a2c25945e8458a0b8582ad0860d08e3572170f4 (patch)
tree22477c99b1de5500410a0d439ac58d3cd613928e /src/gui/kernel
parent854e72538426b32f72acd6c6c76af04bc8b78994 (diff)
downloadQt-8a2c25945e8458a0b8582ad0860d08e3572170f4.zip
Qt-8a2c25945e8458a0b8582ad0860d08e3572170f4.tar.gz
Qt-8a2c25945e8458a0b8582ad0860d08e3572170f4.tar.bz2
Fix for player application exit crash
Crash is a regression from the commit 7cd29ef169b94b0182b4207b37715f7427e4e4d6. The commit 7cd29ef169b94b0182b4207b37715f7427e4e4d6 creates two fep contexts, another one is created while first one being created. When application exit, other fep context is deleted after coeEnv destroyed. Fep context destructor uses method from coeEnv and when second fep Context deleted application crashes. To fix the crash, flaged fep context creation while being created. Change-Id: I3079179df2c3a59a0117d5de775116e06d7e3cff Reviewed-by: Satyam Bandarapu <ext-satyam.bandarapu@nokia.com> Reviewed-by: Murray Read <ext-murray.2.read@nokia.com> Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication.cpp10
-rw-r--r--src/gui/kernel/qapplication_p.h4
2 files changed, 12 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index a0a093f..c520fcf 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -164,6 +164,10 @@ QInputContext *QApplicationPrivate::inputContext = 0;
bool QApplicationPrivate::quitOnLastWindowClosed = true;
+#ifdef Q_OS_SYMBIAN
+bool QApplicationPrivate::inputContextBeingCreated = false;
+#endif
+
#ifdef Q_WS_WINCE
int QApplicationPrivate::autoMaximizeThreshold = -1;
bool QApplicationPrivate::autoSipEnabled = false;
@@ -5508,7 +5512,11 @@ QInputContext *QApplication::inputContext() const
if (keys.contains(QLatin1String("hbim"))) {
that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("hbim"), that);
} else if (keys.contains(QLatin1String("coefep"))) {
- that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("coefep"), that);
+ if (!that->d_func()->inputContextBeingCreated) {
+ that->d_func()->inputContextBeingCreated = true;
+ that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("coefep"), that);
+ that->d_func()->inputContextBeingCreated = false;
+ }
} else {
for (int c = 0; c < keys.size() && !d->inputContext; ++c) {
that->d_func()->inputContext = QInputContextFactory::create(keys[c], that);
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 3afb0e3..9acf2c8 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -419,7 +419,9 @@ public:
}
#endif
static QInputContext *inputContext;
-
+#ifdef Q_OS_SYMBIAN
+ static bool inputContextBeingCreated;
+#endif
static Qt::MouseButtons mouse_buttons;
static Qt::KeyboardModifiers modifier_buttons;