summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextcontrol.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-11-03 12:56:42 (GMT)
committeraxis <qt-info@nokia.com>2009-11-03 13:18:15 (GMT)
commit381247326743888075979664f50ea804d6123c42 (patch)
treefe6b082b8123ff35b06703d7e993f9463d051b22 /src/gui/text/qtextcontrol.cpp
parent95f7076937065a78029fc50d506fba58f8c6199c (diff)
downloadQt-381247326743888075979664f50ea804d6123c42.zip
Qt-381247326743888075979664f50ea804d6123c42.tar.gz
Qt-381247326743888075979664f50ea804d6123c42.tar.bz2
Fixed an input method bug when erasing the last character.
Previously we didn't update the editor contents if the new preedit string was empty. However, it could be empty because the user just erased it, so the bug was fixed by checking whether the preedit string in the event and in the editor are different. RevBy: Denis Dzyubenko
Diffstat (limited to 'src/gui/text/qtextcontrol.cpp')
-rw-r--r--src/gui/text/qtextcontrol.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index 3f6545c..9497b6f 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -1831,7 +1831,8 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e)
e->ignore();
return;
}
- bool isGettingInput = !e->commitString().isEmpty() || !e->preeditString().isEmpty()
+ bool isGettingInput = !e->commitString().isEmpty()
+ || e->preeditString() != cursor.block().layout()->preeditAreaText()
|| e->replacementLength() > 0;
if (isGettingInput) {