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>
This commit is contained in:
parent
bbeb295782
commit
964f8be1d2
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user