summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlineedit.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-06-03 15:13:29 (GMT)
committeraxis <qt-info@nokia.com>2009-06-03 15:21:00 (GMT)
commit49b6219dd12815d5155aa28bd8d1dbf26cf0b1d7 (patch)
tree63bda847b1cf3ef8be64751bd4e63e710f13e22f /src/gui/widgets/qlineedit.cpp
parentc3cad947658ba2ea70e6b9335dd365192a6ed4c4 (diff)
downloadQt-49b6219dd12815d5155aa28bd8d1dbf26cf0b1d7.zip
Qt-49b6219dd12815d5155aa28bd8d1dbf26cf0b1d7.tar.gz
Qt-49b6219dd12815d5155aa28bd8d1dbf26cf0b1d7.tar.bz2
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.
Diffstat (limited to 'src/gui/widgets/qlineedit.cpp')
-rw-r--r--src/gui/widgets/qlineedit.cpp3
1 files changed, 2 insertions, 1 deletions
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) {