QDeclarativeDebug: Fix autotest breakage in qdeclarativedebugjs
authorKai Koehne <kai.koehne@nokia.com>
Thu, 29 Sep 2011 10:12:15 +0000 (12:12 +0200)
committerKai Koehne <kai.koehne@nokia.com>
Thu, 29 Sep 2011 13:21:43 +0000 (15:21 +0200)
commit739e705150ad114eb92a1fac34a51d30322ffc31
tree5f121ac2c6414ff6587fd1dd45f48ab11751a85b
parent2a1e6ef9d3f519d9109672b593dae07821e1c043
QDeclarativeDebug: Fix autotest breakage in qdeclarativedebugjs

In case a service is waiting for messages via waitForMessage, deliver
all arriving messages to the service directly, not only the first one.

In the case of QDeclarativeDebugJS::watchExpressions() test case,
the first message is actually WATCH_EXPRESSIONS , followed by
BREAKPOINTS. However, the second BREAKPOINTS command wasn't
delivered directly, but queued in the main event loop. As soon as
waitForMessage() was returning, QJSDebugClient was just calling
waitForMessage() anew (because BREAKPOINTS wasn't delivered yet),
blocking the main event loop from being run.

Reviewed-by: Aurindam Jana
src/declarative/debugger/qdeclarativedebugserver.cpp