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>
bb10
Daniel Teske 2014-08-13 13:51:00 +02:00
parent 8d57725338
commit e5f3a25253
1 changed files with 5 additions and 3 deletions

View File

@ -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();