diff options
author | Sami Merila <sami.merila@nokia.com> | 2011-10-21 11:40:28 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2011-10-21 11:40:28 (GMT) |
commit | 5195c26208e9e2d80509c8308d590da2ef8a029b (patch) | |
tree | 7aaa667e9e413cf19ec475267cfa2411b3ea9b92 /src/gui/inputmethod | |
parent | 2be143ebb5246bb2f9b674bb09d23df5b2b6c504 (diff) | |
download | Qt-5195c26208e9e2d80509c8308d590da2ef8a029b.zip Qt-5195c26208e9e2d80509c8308d590da2ef8a029b.tar.gz Qt-5195c26208e9e2d80509c8308d590da2ef8a029b.tar.bz2 |
Regression caused by 2be143ebb5246bb2f9b674bb09d23df5b2b6c504
After 2be143ebb5246bb2f9b674bb09d23df5b2b6c504, if user opts to spell
a word him/herself instead of using the suggested word list, the
result is incorrect. The existing preedit string is committed,
then cursor is moved to the beginning and user written word is
added. E.g. user writes 'tadaa' then selects to spell it again and
writes 'radar', in editor there is 'radartadaa'.
Regression is caused due to storing the cursor pointer even in cases
where there is no stored preedit string.
Task-number: QTBUG-22147
Reviewed-by: Miikka Heikkinen
Diffstat (limited to 'src/gui/inputmethod')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 66ab4c8..eeec04b 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -164,7 +164,7 @@ void QCoeFepInputContext::reset() // text. if (m_cachedPreeditString.isEmpty() && !(currentHints & Qt::ImhNoPredictiveText)) { m_cachedPreeditString = m_preeditString; - if (focusWidget()) { + if (focusWidget() && !m_cachedPreeditString.isEmpty()) { int cursor = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt(); int anchor = focusWidget()->inputMethodQuery(Qt::ImAnchorPosition).toInt(); if (cursor == anchor) |