forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Kai Koehne
parent
5bfb5d9c32
commit
8227990600
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user