summaryrefslogtreecommitdiffstats
path: root/src/declarative/debugger/qjsdebugservice.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2011-06-08 09:01:26 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2011-06-08 10:09:11 (GMT)
commitc038e3505309bb954123493cb5f96c73e114f3d0 (patch)
tree78d957fb4d1c88284b95d15dd1b46823b4a69010 /src/declarative/debugger/qjsdebugservice.cpp
parent7602be09663d37f01cfd640a7f1be959ce4317b7 (diff)
downloadQt-c038e3505309bb954123493cb5f96c73e114f3d0.zip
Qt-c038e3505309bb954123493cb5f96c73e114f3d0.tar.gz
Qt-c038e3505309bb954123493cb5f96c73e114f3d0.tar.bz2
QDeclarativeDebug: Fix QJSDebugService if launched with ',block'
If the debugger is launched in blocking mode the service will be enabled from the start. Reviewed-by: Thorbjorn Lindeijer
Diffstat (limited to 'src/declarative/debugger/qjsdebugservice.cpp')
-rw-r--r--src/declarative/debugger/qjsdebugservice.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/declarative/debugger/qjsdebugservice.cpp b/src/declarative/debugger/qjsdebugservice.cpp
index 4ce2c90..ad84f65 100644
--- a/src/declarative/debugger/qjsdebugservice.cpp
+++ b/src/declarative/debugger/qjsdebugservice.cpp
@@ -71,6 +71,16 @@ void QJSDebugService::addEngine(QDeclarativeEngine *engine)
Q_ASSERT(!m_engines.contains(engine));
m_engines.append(engine);
+
+ if (status() == Enabled && !m_engines.isEmpty() && !m_agent) {
+ m_agent = new QJSDebuggerAgent(engine, engine);
+ connect(m_agent, SIGNAL(stopped(bool,QString)),
+ this, SLOT(executionStopped(bool,QString)));
+
+ while (!m_agent->isInitialized()) {
+ waitForMessage();
+ }
+ }
}
void QJSDebugService::removeEngine(QDeclarativeEngine *engine)