Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-58220

IBus ForwardKeyEvent() signal cannot be received

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.7.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      Original bug report is https://bugzilla.redhat.com/show_bug.cgi?id=1368757

      I try to implement "ForwardKeyEvent" signal in QT5 IBus module and I investigated libibusplatforminputcontextplugin.so but it cannot receive ForwardKeyEvent dbus signal.

      When "CommitText" signal is received, QIBusInputContextProxy::qt_static_metacall() receives the signal correctly in the trace stack:

      #0 0x00007f0730053ff9 in QIBusPlatformInputContext::commitText(QDBusVariant const&) (this=0x2417930, text=...) at qibusplatforminputcontext.cpp:257
      #1 0x00007f0730061b3b in QIBusPlatformInputContext::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x2417930, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffeffa60440)
      at .moc/moc_qibusplatforminputcontext.cpp:117
      #2 0x00007f074d2367b1 in QMetaObject::activate(QObject*, int, int, void**) () at /lib64/libQt5Core.so.5
      #3 0x00007f07300644e0 in QIBusInputContextProxy::CommitText(QDBusVariant const&) (this=0x2411a50, _t1=...) at .moc/moc_qibusinputcontextproxy.cpp:515
      #4 0x00007f073006317b in QIBusInputContextProxy::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x2411a50, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffeffa60880) at .moc/moc_qibusinputcontextproxy.cpp:218
      #5 0x00007f0730064458 in QIBusInputContextProxy::qt_metacall(QMetaObject::Call, int, void**) (this=0x2411a50, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffeffa60880) at .moc/moc_qibusinputcontextproxy.cpp:501
      #6 0x00007f073aeb6640 in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int) () at /lib64/libQt5DBus.so.5
      #7 0x00007f074d237879 in QObject::event(QEvent*) ()
      at /lib64/libQt5Core.so.5
      #8 0x00007f074cabdecc in QApplicationPrivate::notify_helper(QObject*, QEvent*
      ) () at /lib64/libQt5Widgets.so.5
      #9 0x00007f074cac5671 in QApplication::notify(QObject*, QEvent*) ()
      at /lib64/libQt5Widgets.so.5
      #10 0x00007f074d20f7aa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
      #11 0x00007f074d211e90 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib64/libQt5Core.so.5
      #12 0x00007f074d25d6a3 in postEventSourceDispatch(_GSource*, int (void*), void*) () at /lib64/libQt5Core.so.5
      #13 0x00007f07485e3e42 in g_main_context_dispatch ()
      at /lib64/libglib-2.0.so.0
      #14 0x00007f07485e41c0 in g_main_context_iterate.isra ()
      at /lib64/libglib-2.0.so.0
      #15 0x00007f07485e426c in g_main_context_iteration ()
      at /lib64/libglib-2.0.so.0
      #16 0x00007f074d25d71f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
      #17 0x00007f074d20e73a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
      #18 0x00007f074d21623c in QCoreApplication::exec() ()
      at /lib64/libQt5Core.so.5
      #19 0x000000000040225d in main(int, char**) (argc=1, argv=0x7ffeffa611c8)
      at qt_entry.c:102

      But QIBusInputContextProxy::qt_static_metacall() cannot receive "ForwardKeyEvent" signal.

      Do you have any ideas about which part blocks the signal?

      You can test "ForwardKeyEvent" signal in any IBus engines.
      E.g. ibus-tmpl's python engine can have the following test:
      https://github.com/ibus/ibus-tmpl

      — /usr/share/ibus-tmpl/engine.py.orig
      +++ /usr/share/ibus-tmpl/engine.py
      @@ -49,6 +49,10 @@ class EngineEnchant(IBus.Engine):
      if not is_press:
      return False

      + if keyval == IBus.KEY_j:
      + print('test forward_key_event', keyval, keycode, state)
      + self.forward_key_event(keyval, keycode, state)
      + return True
      if self.__preedit_string:
      if keyval == keysyms.Return:
      self._commit_string(self._preedit_string)

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fujiwara Fujiwara
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes