diff options
author | axis <qt-info@nokia.com> | 2010-09-02 13:40:38 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-09-02 14:15:33 (GMT) |
commit | efe67ac8c1c59fd4cf8c793b549169f4e2926ac8 (patch) | |
tree | 7c7a59ed6d8000f67d8aa706b644536123d4dd73 /src/gui/inputmethod | |
parent | f8c789a70ee3061dd81307ead82c47bb0f8041d5 (diff) | |
download | Qt-efe67ac8c1c59fd4cf8c793b549169f4e2926ac8.zip Qt-efe67ac8c1c59fd4cf8c793b549169f4e2926ac8.tar.gz Qt-efe67ac8c1c59fd4cf8c793b549169f4e2926ac8.tar.bz2 |
Fixed a bug where passwords would not be committed when confirming.
The bug happened when you were typing a password and pressing "Done"
softkey very quickly. Because of the temporarily visible character,
the widget would not contain the full string at the time of softkey
triggering, only the *** part.
Fixed by having the input context listen for softkey (command) events
and commit the temporary character before the softkey action is
triggered.
AutoTest: Included
Task: QTBUG-12949
RevBy: Miikka Heikkinen
Diffstat (limited to 'src/gui/inputmethod')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_p.h | 1 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index 2fd6d16..ac40bba 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -84,6 +84,7 @@ public: void update(); bool filterEvent(const QEvent *event); + bool symbianFilterEvent(QWidget *keyWidget, const QSymbianEvent *event); void mouseHandler( int x, QMouseEvent *event); bool isComposing() const { return !m_preeditString.isEmpty(); } diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index add3d17..abcec32 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -47,6 +47,7 @@ #include <qgraphicsview.h> #include <qgraphicsscene.h> #include <qgraphicswidget.h> +#include <qsymbianevent.h> #include <private/qcore_symbian_p.h> #include <fepitfr.h> @@ -287,6 +288,18 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) return false; } +bool QCoeFepInputContext::symbianFilterEvent(QWidget *keyWidget, const QSymbianEvent *event) +{ + Q_UNUSED(keyWidget); + if (event->type() == QSymbianEvent::CommandEvent) + // A command basically means the same as a button being pushed. With Qt buttons + // that would normally result in a reset of the input method due to the focus change. + // This should also happen for commands. + reset(); + + return false; +} + void QCoeFepInputContext::timerEvent(QTimerEvent *timerEvent) { if (timerEvent->timerId() == m_tempPreeditStringTimeout.timerId()) |