summaryrefslogtreecommitdiffstats
path: root/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-05-08 12:51:43 (GMT)
committeraxis <qt-info@nokia.com>2009-05-08 12:59:44 (GMT)
commit778ab87d8d2a8c834153bc68a88985d7cb5c0e9f (patch)
treed2a52b34d9c6e460d1f2a29fceb1a33dd9f33fd7 /src/gui/inputmethod/qcoefepinputcontext_s60.cpp
parent60f583e0934a8f1cb7eb4b6a378c827944d4178a (diff)
downloadQt-778ab87d8d2a8c834153bc68a88985d7cb5c0e9f.zip
Qt-778ab87d8d2a8c834153bc68a88985d7cb5c0e9f.tar.gz
Qt-778ab87d8d2a8c834153bc68a88985d7cb5c0e9f.tar.bz2
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.
Diffstat (limited to 'src/gui/inputmethod/qcoefepinputcontext_s60.cpp')
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp6
1 files changed, 5 insertions, 1 deletions
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<const QKeyEvent *>(event);