Skip to content

Commit 5195c26

Browse files
author
Sami Merila
committed
Regression caused by 2be143e
After 2be143e, 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
1 parent 2be143e commit 5195c26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gui/inputmethod/qcoefepinputcontext_s60.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void QCoeFepInputContext::reset()
164164
// text.
165165
if (m_cachedPreeditString.isEmpty() && !(currentHints & Qt::ImhNoPredictiveText)) {
166166
m_cachedPreeditString = m_preeditString;
167-
if (focusWidget()) {
167+
if (focusWidget() && !m_cachedPreeditString.isEmpty()) {
168168
int cursor = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt();
169169
int anchor = focusWidget()->inputMethodQuery(Qt::ImAnchorPosition).toInt();
170170
if (cursor == anchor)

0 commit comments

Comments
 (0)