diff options
author | Aurindam Jana <aurindam.jana@nokia.com> | 2012-03-14 10:11:08 +0100 |
---|---|---|
committer | Aurindam Jana <aurindam.jana@nokia.com> | 2012-03-14 14:47:36 +0100 |
commit | 41a66d7478ba2141775820902718a78ab303288a (patch) | |
tree | 9c12b9a951df00b0dd604a36683143a05d4c4327 /src/plugins/debugger/qml/qmlv8debuggerclient.cpp | |
parent | 4ab8925bc6dfcd45f643954443cb17f9bef7d954 (diff) | |
download | qt-creator-41a66d7478ba2141775820902718a78ab303288a.tar.gz |
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>
Diffstat (limited to 'src/plugins/debugger/qml/qmlv8debuggerclient.cpp')
-rw-r--r-- | src/plugins/debugger/qml/qmlv8debuggerclient.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp index 1ce9aa8ff7..9067ec08c3 100644 --- a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp +++ b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp @@ -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); + } } } } |