forked from qt-creator/qt-creator
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:
@@ -1310,6 +1310,14 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data)
|
|||||||
BreakpointModelId id = d->breakpointsSync.take(seq);
|
BreakpointModelId id = d->breakpointsSync.take(seq);
|
||||||
d->breakpoints.insert(id, index);
|
d->breakpoints.insert(id, index);
|
||||||
|
|
||||||
|
//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();
|
BreakHandler *handler = d->engine->breakHandler();
|
||||||
if (handler->state(id) != BreakpointInserted) {
|
if (handler->state(id) != BreakpointInserted) {
|
||||||
BreakpointResponse br = handler->response(id);
|
BreakpointResponse br = handler->response(id);
|
||||||
@@ -1318,6 +1326,7 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data)
|
|||||||
handler->setResponse(id, br);
|
handler->setResponse(id, br);
|
||||||
handler->notifyBreakpointInsertOk(id);
|
handler->notifyBreakpointInsertOk(id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -1481,6 +1490,12 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data)
|
|||||||
br.functionName = invocationText;
|
br.functionName = invocationText;
|
||||||
handler->setResponse(id, br);
|
handler->setResponse(id, br);
|
||||||
}
|
}
|
||||||
|
if (handler->state(id) != BreakpointInserted) {
|
||||||
|
br.lineNumber = breakData.value(
|
||||||
|
_("sourceLine")).toInt() + 1;
|
||||||
|
handler->setResponse(id, br);
|
||||||
|
handler->notifyBreakpointInsertOk(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user