diff options
author | axis <qt-info@nokia.com> | 2009-11-12 15:20:48 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-11-12 15:35:13 (GMT) |
commit | 5bc53cb71f22d74cf13bef7e8cae25833b40d0b4 (patch) | |
tree | 4962b6a9415a780ef67a5151dfa45549731c34b4 /src/gui/inputmethod | |
parent | 185655f01ffa288bed5cbb433843b6db26cdb632 (diff) | |
download | Qt-5bc53cb71f22d74cf13bef7e8cae25833b40d0b4.zip Qt-5bc53cb71f22d74cf13bef7e8cae25833b40d0b4.tar.gz Qt-5bc53cb71f22d74cf13bef7e8cae25833b40d0b4.tar.bz2 |
Made the select button commit the T9 word rather than exit widget.
Task: QTBUG-5661
RevBy: Janne Koskinen
Diffstat (limited to 'src/gui/inputmethod')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 806df07..08d86d7 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -203,14 +203,26 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) { const QKeyEvent *keyEvent = static_cast<const QKeyEvent *>(event); - Q_ASSERT(m_lastImHints == focusWidget()->inputMethodHints()); - if (keyEvent->key() == Qt::Key_F20 && m_lastImHints & Qt::ImhHiddenText) { - // Special case in Symbian. On editors with secret text, F20 is for some reason - // considered to be a backspace. - QKeyEvent modifiedEvent(keyEvent->type(), Qt::Key_Backspace, keyEvent->modifiers(), - keyEvent->text(), keyEvent->isAutoRepeat(), keyEvent->count()); - QApplication::sendEvent(focusWidget(), &modifiedEvent); - return true; + switch (keyEvent->key()) { + case Qt::Key_F20: + Q_ASSERT(m_lastImHints == focusWidget()->inputMethodHints()); + if (m_lastImHints & Qt::ImhHiddenText) { + // Special case in Symbian. On editors with secret text, F20 is for some reason + // considered to be a backspace. + QKeyEvent modifiedEvent(keyEvent->type(), Qt::Key_Backspace, keyEvent->modifiers(), + keyEvent->text(), keyEvent->isAutoRepeat(), keyEvent->count()); + QApplication::sendEvent(focusWidget(), &modifiedEvent); + return true; + } + break; + case Qt::Key_Select: + if (!m_preeditString.isEmpty()) { + commitCurrentString(false); + return true; + } + break; + default: + break; } } |