diff options
author | Aurindam Jana <aurindam.jana@nokia.com> | 2011-10-01 16:21:59 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-10-05 17:05:25 +0200 |
commit | 8227990600cf1b99e47a2f30278aacdd39fa6f10 (patch) | |
tree | 382b1738a891f09573ac59558567ff7c45f2867e /src/plugins/debugger | |
parent | 5bfb5d9c324685dcb49753b42ee9a0f87e866bc5 (diff) | |
download | qt-creator-8227990600cf1b99e47a2f30278aacdd39fa6f10.tar.gz |
QmlJsDebugger: Handle Breakpoint states correctly.
The QmlJsDebugger likes to remove breakpoints in the
BreakpointInsertProceeding state. The state transition from
BreakpointInsertProceeding to BreakpointRemoveRequested is now
allowed. The state of breakpoint is set to BreakpointInserted
only when the breakpoint is hit.
Change-Id: I2fdd8d916363866fd920af7488f78d92df54d93b
Reviewed-on: http://codereview.qt-project.org/5899
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r-- | src/plugins/debugger/breakhandler.cpp | 4 | ||||
-rw-r--r-- | src/plugins/debugger/qml/qscriptdebuggerclient.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 1f16f713cd..cb1df995c2 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -842,7 +842,8 @@ static bool isAllowedTransition(BreakpointState from, BreakpointState to) case BreakpointInsertProceeding: return to == BreakpointInserted || to == BreakpointDead - || to == BreakpointChangeRequested; + || to == BreakpointChangeRequested + || to == BreakpointRemoveRequested; case BreakpointChangeRequested: return to == BreakpointChangeProceeding; case BreakpointChangeProceeding: @@ -1011,6 +1012,7 @@ void BreakHandler::removeBreakpoint(BreakpointModelId id) BREAK_ASSERT(it != m_storage.end(), return); switch (it->state) { case BreakpointInserted: + case BreakpointInsertProceeding: setState(id, BreakpointRemoveRequested); scheduleSynchronization(); break; diff --git a/src/plugins/debugger/qml/qscriptdebuggerclient.cpp b/src/plugins/debugger/qml/qscriptdebuggerclient.cpp index c7b64cc36b..12710c44d1 100644 --- a/src/plugins/debugger/qml/qscriptdebuggerclient.cpp +++ b/src/plugins/debugger/qml/qscriptdebuggerclient.cpp @@ -416,6 +416,8 @@ void QScriptDebuggerClient::messageReceived(const QByteArray &data) QString processedFilename = handler->fileName(id); if (processedFilename == file && handler->lineNumber(id) == line) { + if (handler->state(id) == BreakpointInsertProceeding) + handler->notifyBreakpointInsertOk(id); QTC_CHECK(handler->state(id) == BreakpointInserted); BreakpointResponse br = handler->response(id); br.fileName = file; |