summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/breakhandler.cpp
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@nokia.com>2011-10-01 16:21:59 +0200
committerKai Koehne <kai.koehne@nokia.com>2011-10-05 17:05:25 +0200
commit8227990600cf1b99e47a2f30278aacdd39fa6f10 (patch)
tree382b1738a891f09573ac59558567ff7c45f2867e /src/plugins/debugger/breakhandler.cpp
parent5bfb5d9c324685dcb49753b42ee9a0f87e866bc5 (diff)
downloadqt-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/breakhandler.cpp')
-rw-r--r--src/plugins/debugger/breakhandler.cpp4
1 files changed, 3 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;