QmlV8DebuggerClient: Make breakpoint non-pending

Make breakpoint non-pending when the breakpoint is accepted
by the v8 debugger.

Change-Id: Id67ce764ef6be9279d3fcc0f34734e5ac9541425
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Aurindam Jana
2012-03-14 10:11:08 +01:00
parent 4ab8925bc6
commit 41a66d7478

View File

@@ -1310,13 +1310,22 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data)
BreakpointModelId id = d->breakpointsSync.take(seq);
d->breakpoints.insert(id, index);
BreakHandler *handler = d->engine->breakHandler();
if (handler->state(id) != BreakpointInserted) {
BreakpointResponse br = handler->response(id);
br.lineNumber = breakpointData.value(_("line")
).toInt() + 1;
handler->setResponse(id, br);
handler->notifyBreakpointInsertOk(id);
//Is actual position info present? Then breakpoint was
//accepted
const QVariantList actualLocations =
breakpointData.value(
_("actual_locations")).toList();
if (actualLocations.count()) {
//The breakpoint requested line should be same as
//actual line
BreakHandler *handler = d->engine->breakHandler();
if (handler->state(id) != BreakpointInserted) {
BreakpointResponse br = handler->response(id);
br.lineNumber = breakpointData.value(_("line")
).toInt() + 1;
handler->setResponse(id, br);
handler->notifyBreakpointInsertOk(id);
}
}
@@ -1481,6 +1490,12 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data)
br.functionName = invocationText;
handler->setResponse(id, br);
}
if (handler->state(id) != BreakpointInserted) {
br.lineNumber = breakData.value(
_("sourceLine")).toInt() + 1;
handler->setResponse(id, br);
handler->notifyBreakpointInsertOk(id);
}
}
}
}