From 778ab87d8d2a8c834153bc68a88985d7cb5c0e9f Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 8 May 2009 14:51:43 +0200 Subject: Replace Q_ASSERT with return statement. The input context *can* receive events for unfocused widgets, namely when a CloseSoftwareInputPanel event is sent, or when a mouse event is sent to a nonfocusable widget. --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index bf50383..1ae3d79 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -207,7 +207,11 @@ QString QCoeFepInputContext::language() bool QCoeFepInputContext::filterEvent(const QEvent *event) { - Q_ASSERT(focusWidget()); + // The CloseSoftwareInputPanel event is not handled here, because the VK will automatically + // close when it discovers that the underlying widget does not have input capabilities. + + if (!focusWidget()) + return false; if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) { const QKeyEvent *keyEvent = static_cast(event); -- cgit v0.12 From a138ef980ae017c940142e18f2532aa0938f14c3 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Fri, 8 May 2009 16:11:34 +0300 Subject: Removed CActiveScheduler::Install(NULL) from closingDown. When calling QThread::terminate - closingDown is not called from QThread context, but from thread which is called terminate. In this case, if we Install(NULL) AS, we will actually remove the AS from calling thread not from terminated thread. Since thread is anyway going to be terminated there is not much point on setting AS to NULL. --- src/corelib/kernel/qeventdispatcher_symbian.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 3110e63..6c47c7b 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -505,7 +505,6 @@ void QEventDispatcherSymbian::closingDown() delete m_wakeUpAO; if (m_activeScheduler) { - CActiveScheduler::Install(NULL); delete m_activeScheduler; } } -- cgit v0.12