Skip to content
Snippets Groups Projects
Commit 8cd370e1 authored by Kai Koehne's avatar Kai Koehne Committed by Eike Ziller
Browse files

Debugger: Fix JS debugging on Harmattan PR1.2


So far we assumend that the JSDebugAgent service switches to
the Enabled state after the constructor has run. That's apparently
not true for Harmattan PR1.2 (maybe the app / Qt calls process
events by hand, maybe it was a race condition from the start).

Fix this by checking the status already in the constructor, and
register ourselves as debugger agent if status == Enabled.

Change-Id: Icae189102116c8b572e05ce6c64f14b8f428ed2f
Reviewed-by: default avatarhjk <qthjk@ovi.com>
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@nokia.com>
parent 4345fc8c
No related branches found
No related tags found
No related merge requests found
......@@ -280,13 +280,19 @@ JSDebuggerAgent::JSDebuggerAgent(QScriptEngine *engine)
: QDeclarativeDebugService("JSDebugger")
, QScriptEngineAgent(engine)
, d(new JSDebuggerAgentPrivate(this))
{}
{
if (status() == Enabled)
engine->setAgent(this);
}
JSDebuggerAgent::JSDebuggerAgent(QDeclarativeEngine *engine)
: QDeclarativeDebugService("JSDebugger")
, QScriptEngineAgent(QDeclarativeDebugHelper::getScriptEngine(engine))
, d(new JSDebuggerAgentPrivate(this))
{}
{
if (status() == Enabled)
QDeclarativeDebugHelper::getScriptEngine(engine)->setAgent(this);
}
/*!
Destroys this QScriptDebuggerAgent.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment