From c7d2d4b12ed21afbb6f620e290019f0f22d4d528 Mon Sep 17 00:00:00 2001 From: Riikka Inkila Date: Fri, 13 Apr 2012 11:50:53 +0300 Subject: Symbian: avoid crash when inline editing is canceled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Juha Kukkonen (cherry picked from commit 94df302a8d62c995dedadce0f9a9519a158fd369) --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 7 ++++--- 1 file 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(); -- cgit v1.2.3