Make XCB plugin work better in combination with auto-tests.

When an auto-test calls processEvents() indirectly via QTest::qWait(),
QAbstractEventDispatcher::aboutToBlock() doesn't get emitted since
the processEvents() implementation gets called without
the QEventLoop::WaitForMoreEvents flag set. Since the auto-tests depend
on all events getting delivered, we need to process the XCB events on
awake() as well.
This commit is contained in:
Samuel Rødal 2011-06-06 09:00:13 +02:00
parent 0ca326917a
commit 36b2c31ba8

View File

@ -128,6 +128,7 @@ QXcbConnection::QXcbConnection(const char *displayName)
QAbstractEventDispatcher *dispatcher = QAbstractEventDispatcher::instance(qApp->thread());
connect(dispatcher, SIGNAL(aboutToBlock()), this, SLOT(processXcbEvents()));
connect(dispatcher, SIGNAL(awake()), this, SLOT(processXcbEvents()));
sync();
}