diff --git a/src/qibusinputcontext.cpp b/src/qibusinputcontext.cpp index 27c146b..046a335 100644 --- a/src/qibusinputcontext.cpp +++ b/src/qibusinputcontext.cpp @@ -1,7 +1,7 @@ +#include #include "qibusinputcontext.h" #include "qibusinputcontextproxy.h" - namespace IBus { InputContext::InputContext (const BusPointer &bus, const QString &path) @@ -148,7 +148,10 @@ InputContext::processKeyEvent (uint keyval, uint keycode, uint state) Q_ASSERT (m_context); QDBusPendingReply reply = m_context->ProcessKeyEvent (keyval, keycode, state); - reply.waitForFinished (); + + do { + QCoreApplication::processEvents (QEventLoop::WaitForMoreEvents); + } while (QCoreApplication::hasPendingEvents () || !reply.isFinished ()); if (reply.isError ()) { qWarning () << "InputContext::processKeyEvent:" << reply.error ();