diff options
| author | Takao Fujiwara <tfujiwar@redhat.com> | 2014-10-15 18:35:55 +0900 |
|---|---|---|
| committer | hjk <hjk121@nokiamail.com> | 2014-10-15 11:49:47 +0200 |
| commit | 2b7dae1b84b3918ca808d94e5eee7e03b5e4f9df (patch) | |
| tree | c63ec38cea1e3db8708893a010134e8d8fab6958 /src | |
| parent | 1502ea104ad165b0956297f31cd537b1d6a2db1e (diff) | |
| download | qt-creator-2b7dae1b84b3918ca808d94e5eee7e03b5e4f9df.tar.gz | |
Delete QEvent::InputMethod handling in FakeVimHandler::eventFilter()
The head keys handling is not needed because IBusEngineSimple handles
compose keys.
Also the length of QInputMethodEvent.commitString() is not one and
prevent users from auto-complettions.
Change-Id: Ieb0022add243829340797954e7d48ca71af2c249
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/fakevim/fakevimhandler.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index c5b71fb879..da57c536ab 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -8518,21 +8518,6 @@ bool FakeVimHandler::eventFilter(QObject *ob, QEvent *ev) return false; } - if (ev->type() == QEvent::InputMethod && ob == d->editor()) { - // This handles simple dead keys. The sequence of events is - // KeyRelease-InputMethod-KeyRelease for dead keys instead of - // KeyPress-KeyRelease as for simple keys. As vi acts on key presses, - // we have to act on the InputMethod event. - // FIXME: A first approximation working for e.g. ^ on a German keyboard - QInputMethodEvent *imev = static_cast<QInputMethodEvent *>(ev); - KEY_DEBUG("INPUTMETHOD" << imev->commitString() << imev->preeditString()); - QString commitString = imev->commitString(); - int key = commitString.size() == 1 ? commitString.at(0).unicode() : 0; - QKeyEvent kev(QEvent::KeyPress, key, Qt::KeyboardModifiers(), commitString); - EventResult res = d->handleEvent(&kev); - return res == EventHandled || res == EventCancelled; - } - if (ev->type() == QEvent::KeyPress && (ob == d->editor() || (Private::g.mode == ExMode || Private::g.subsubmode == SearchSubSubMode))) { |
