diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-09-05 17:42:08 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-06 11:09:47 +0200 |
commit | 964f8be1d281b56d6721b66baecd2a301a09ff0d (patch) | |
tree | a9bc693a0f8c9a02cf809b2484159369a015b197 | |
parent | bbeb295782f9a86febcf0619b25937d0d396d35b (diff) |
Fix TextInput test failures.
emitCursorPositionChanged won't emit cursorPositionChanged if the
cursor position hasn't changed but that doesn't mean the micro focus
hasn't changed, so emit updateMicroFocus changed when
cursorPositionChanged isn't.
Task-number: QTBUG-21017 QTBUG-21011
Change-Id: Id0b6bd5aed16563b7b5cce643745e453ba4857a5
Reviewed-on: http://codereview.qt.nokia.com/4181
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
-rw-r--r-- | src/gui/widgets/qlinecontrol.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 18b4490729..0769bb9697 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -520,6 +520,7 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event) cursorPositionChanged = true; } } + #ifndef QT_NO_IM setPreeditArea(m_cursor, event->preeditString()); #endif //QT_NO_IM @@ -688,6 +689,8 @@ bool QLineControl::finishChange(int validateFromState, bool update, bool edited) m_selDirty = false; emit selectionChanged(); } + if (m_cursor == m_lastCursorPos) + updateMicroFocus(); emitCursorPositionChanged(); return true; } |