[qt5] Fixes Issue #5

Nested event loop seems to be the root cause for this.
This commit is contained in:
Weng Xuetian 2015-01-17 16:51:56 -08:00
parent 944d523e79
commit b0cfb8f5a1
1 changed files with 1 additions and 3 deletions

View File

@ -647,9 +647,7 @@ bool QFcitxPlatformInputContext::filterEvent(const QEvent* event)
(press) ? FCITX_PRESS_KEY : FCITX_RELEASE_KEY,
QDateTime::currentDateTime().toTime_t()
);
do {
QCoreApplication::processEvents (QEventLoop::WaitForMoreEvents);
} while (QCoreApplication::hasPendingEvents () || !result.isFinished ());
result.waitForFinished();
if (!m_connection->isConnected() || !result.isFinished() || result.isError() || result.value() <= 0) {
if (filterEventFallback(keyval, keycode, state, press)) {