summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatyam Bandarapu <ext-satyam.bandarapu@nokia.com>2012-01-13 17:15:45 +0200
committerPasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>2012-01-16 10:41:16 +0100
commit2fe8fefa521b5ce747651572bae8671476aae625 (patch)
treebab104bdfbef9d9061c5ad6f58b5ed56350faf60
parent5a8d6d4598ca4b84b3b4f19554de7bb880cb7412 (diff)
downloadqt4-tools-2fe8fefa521b5ce747651572bae8671476aae625.tar.gz
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> (cherry picked from commit 8a2c25945e8458a0b8582ad0860d08e3572170f4) Reviewed-by: Juha Kukkonen
-rw-r--r--src/gui/kernel/qapplication.cpp10
-rw-r--r--src/gui/kernel/qapplication_p.h4
-rw-r--r--src/s60installs/bwins/QtGuiu.def1
-rw-r--r--src/s60installs/eabi/QtGuiu.def1
4 files changed, 14 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 3605472aae..80a1474c70 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 c4cb19cee4..07368ebc39 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;
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 4e0d7df89d..809b10e332 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -13997,4 +13997,5 @@ EXPORTS
?setReceiveNativePaintEvents@QSymbianGraphicsSystemHelper@@SAXPAVQWidget@@_N@Z @ 13996 NONAME ; void QSymbianGraphicsSystemHelper::setReceiveNativePaintEvents(class QWidget *, bool)
?setNativePaintMode@QSymbianGraphicsSystemHelper@@SAXPAVCCoeControl@@W4NativePaintMode@1@@Z @ 13997 NONAME ; void QSymbianGraphicsSystemHelper::setNativePaintMode(class CCoeControl *, enum QSymbianGraphicsSystemHelper::NativePaintMode)
?setIgnoreFocusChanged@QSymbianGraphicsSystemHelper@@SAXPAVQWidget@@_N@Z @ 13998 NONAME ; void QSymbianGraphicsSystemHelper::setIgnoreFocusChanged(class QWidget *, bool)
+ ?inputContextBeingCreated@QApplicationPrivate@@2_NA @ 13999 NONAME ; bool QApplicationPrivate::inputContextBeingCreated
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 8aaa65dc7d..27892919b9 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -12810,4 +12810,5 @@ EXPORTS
_ZN28QSymbianGraphicsSystemHelper27setReceiveNativePaintEventsEP7QWidgetb @ 12809 NONAME
_ZNK16QTreeViewPrivate18calcLogicalIndicesEP7QVectorIiEPS0_IN22QStyleOptionViewItemV416ViewItemPositionEE @ 12810 NONAME
_ZNK16QTreeViewPrivate25adjustViewOptionsForIndexEP22QStyleOptionViewItemV4RK11QModelIndex @ 12811 NONAME
+ _ZN19QApplicationPrivate24inputContextBeingCreatedE @ 12812 NONAME DATA 1