From 959ff46310b8a27c82ef6b0c1d122b817270f8d9 Mon Sep 17 00:00:00 2001 From: axis Date: Wed, 10 Jun 2009 13:28:40 +0200 Subject: Revert "Fix to qapplication::setActiveWindow autotest case in Symbian." This reverts commit ba105741867dd96a9d58dcfcb78afef60e611bd6. --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 1dfb012..24abb58 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -43,7 +43,6 @@ #include "qcoefepinputcontext_p.h" #include -#include #include #include @@ -90,12 +89,9 @@ QCoeFepInputContext::~QCoeFepInputContext() // This is to make sure that the FEP manager "forgets" about us, // otherwise we may get callbacks even after we're destroyed. // The call is asynchronous though, so we must spin the event loop - // to make sure it gets detected. However we will not spin eventloop - // in case that app is closing, since eventDispatcher is already deleted. + // to make sure it gets detected. CCoeEnv::Static()->InputCapabilitiesChanged(); - if(!QApplicationPrivate::is_app_closing) { - QApplication::processEvents(); - } + QApplication::processEvents(); if (m_fepState) delete m_fepState; -- cgit v0.12 From 8ce6f4b96623d03031c65f396b6789520f114edc Mon Sep 17 00:00:00 2001 From: axis Date: Wed, 10 Jun 2009 15:04:51 +0200 Subject: Fixed FEP crash during application exit. We use a synchronous call rather than an asynchronous one, so we don't risk the pointer being dereferenced after destruction is finished. --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 24abb58..b183e1b 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -88,10 +88,9 @@ QCoeFepInputContext::~QCoeFepInputContext() // This is to make sure that the FEP manager "forgets" about us, // otherwise we may get callbacks even after we're destroyed. - // The call is asynchronous though, so we must spin the event loop - // to make sure it gets detected. - CCoeEnv::Static()->InputCapabilitiesChanged(); - QApplication::processEvents(); + // The call below is essentially equivalent to InputCapabilitiesChanged(), + // but is synchronous, rather than asynchronous. + CCoeEnv::Static()->SyncNotifyFocusObserversOfChangeInFocus(); if (m_fepState) delete m_fepState; -- cgit v0.12