summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiikka Inkila <ext-riikka.j.inkila@nokia.com>2012-04-13 11:50:53 +0300
committerPasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>2012-04-16 10:17:50 +0200
commitc7d2d4b12ed21afbb6f620e290019f0f22d4d528 (patch)
treea5ce854740fa4078e74afc8f0ea9a02bd55aeae1
parent3eaad41a87a8af6534104a8ff108e1a2c2be66f4 (diff)
downloadqt4-tools-c7d2d4b12ed21afbb6f620e290019f0f22d4d528.tar.gz
Symbian: avoid crash when inline editing is canceled
Native side editor state sync request was added into QCoeFepInputContext::CancelFepInlineEdit method to fix QTBUG-20919: text prediction word list/bubble didn't disappear from TextArea/ TextField after a tap and the issue was fixed with the sync request. However Symbian AknFEP was changed in Belle FP1 release so that this sync request is no longer needed to get rid of the exact word bubble when inline editing is canceled with a tap and it can actually currently lead to a crash in the native side with certain input methods as AknFEP doesn't expect FEP-aware text editors to request editor state sync within MCoeFepAwareTextEditor::CancelFepInlineEdit call. Thus the sync request should be made only with older Symbian releases. Task-number: ou1cimx1#983695 Change-Id: Iab7753bbe8b279f89abc1853824a83ad210c5440 Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com> Reviewed-by: Juha Kukkonen <ext-juha.kukkonen@nokia.com> (cherry picked from commit 94df302a8d62c995dedadce0f9a9519a158fd369)
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 62553d8ea1..44a54a321f 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -1501,9 +1501,10 @@ void QCoeFepInputContext::CancelFepInlineEdit()
m_inlinePosition = 0;
sendEvent(event);
- // Sync with native side editor state. Native side can then do various operations
- // based on editor state, such as removing 'exact word bubble'.
- if (!m_pendingInputCapabilitiesChanged)
+ // Prior to S60 5.4 need to sync with native side editor state so that native side can then do
+ // various operations based on editor state, such as removing 'exact word bubble'.
+ // Starting with S60 5.4 this sync request is not needed and can actually lead to a crash.
+ if (QSysInfo::s60Version() < QSysInfo::SV_S60_5_4 && !m_pendingInputCapabilitiesChanged)
ReportAknEdStateEvent(MAknEdStateObserver::EAknSyncEdwinState);
} QT_CATCH(const std::exception&) {
m_preeditString.clear();