summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@digia.com>2014-08-13 13:51:00 +0200
committerDaniel Teske <daniel.teske@digia.com>2014-08-31 11:48:51 +0200
commite5f3a25253263b67f3f211d76ed76ddc2298916e (patch)
tree98d8841b7fe56d19357052d8a5bb9421810d8b02 /src
parent8d5772533887266d54d040d0b33fa22964326fc1 (diff)
IBus Input Method: Check in commit whether we need to commit
Task-number: QTBUG-40755 Change-Id: I283d48cc6d4390a02d0df63ac6e38fa5f73a0ec0 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
index be90bbecb0..25017bdb30 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
@@ -139,9 +139,11 @@ void QIBusPlatformInputContext::commit()
return;
}
- QInputMethodEvent event;
- event.setCommitString(d->predit);
- QCoreApplication::sendEvent(input, &event);
+ if (!d->predit.isEmpty()) {
+ QInputMethodEvent event;
+ event.setCommitString(d->predit);
+ QCoreApplication::sendEvent(input, &event);
+ }
d->context->Reset();
d->predit = QString();