aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannu Koivisto <hannu.koivisto@vincit.fi>2010-12-03 16:10:50 +0200
committerPekka Vuorela <pekka.ta.vuorela@nokia.com>2011-01-11 17:40:08 +0200
commitd614b9753c6d9c62aa31052c8877019780f2e218 (patch)
treefa5d97e1ad2dbe783c038ed0ba383311cf508622
parentf0ca7075655f9ffd9501af9842a7eb000dea55ec (diff)
Fixes: MTextEdit: pre-edit injection event passing in the presence of QMultiInputContext
RevBy: Pekka Vuorela Details: after disabling explicit loading of MInputContext and relying on QT_IM_MODULE, the actual input context returned by QApplication::inputContext is QMultiInputContext which acts as a proxy and forwards calls to, in our typical case, MInputContext. But it doesn't override and forward QObject::event(), so we can't use QCoreApplication::sendEvent for sending the pre-edit injection event to the input context.
-rwxr-xr-xsrc/corelib/widgets/mtextedit.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/corelib/widgets/mtextedit.cpp b/src/corelib/widgets/mtextedit.cpp
index a4a1525d..c051bb29 100755
--- a/src/corelib/widgets/mtextedit.cpp
+++ b/src/corelib/widgets/mtextedit.cpp
@@ -1967,9 +1967,7 @@ void MTextEdit::handleMouseRelease(int eventCursorPosition, QGraphicsSceneMouseE
QInputContext *ic = qApp->inputContext();
if (ic) {
MPreeditInjectionEvent event(preedit, eventCursorPosition - start);
- QCoreApplication::sendEvent(ic, &event);
-
- injectionAccepted = event.isAccepted();
+ injectionAccepted = ic->filterEvent(&event);
}
// if injection wasn't supported, put the text back and fall back to cursor changing