summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
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/widgets
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/widgets')
-rw-r--r--src/gui/widgets/qlinecontrol.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 8f17e98..0fc94c9 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -401,7 +401,8 @@ void QLineControl::moveCursor(int pos, bool mark)
void QLineControl::processInputMethodEvent(QInputMethodEvent *event)
{
int priorState = 0;
- bool isGettingInput = !event->commitString().isEmpty() || !event->preeditString().isEmpty()
+ bool isGettingInput = !event->commitString().isEmpty()
+ || event->preeditString() != preeditAreaText()
|| event->replacementLength() > 0;
bool cursorPositionChanged = false;