From 49b6219dd12815d5155aa28bd8d1dbf26cf0b1d7 Mon Sep 17 00:00:00 2001 From: axis Date: Wed, 3 Jun 2009 17:13:29 +0200 Subject: Fixed a small input method bug in QLineEdit. We need to check for replacementLength as well. Otherwise there will be no undo information if text is deleted using input methods. --- src/gui/widgets/qlineedit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index d9e39d3..a95d2f2 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -2275,7 +2275,8 @@ void QLineEdit::inputMethodEvent(QInputMethodEvent *e) #endif int priorState = 0; - bool isGettingInput = !e->commitString().isEmpty() || !e->preeditString().isEmpty(); + bool isGettingInput = !e->commitString().isEmpty() || !e->preeditString().isEmpty() + || e->replacementLength() > 0; bool cursorPositionChanged = false; if (isGettingInput) { -- cgit v0.12