forked from qt-creator/qt-creator
Debugger: Visually fake instant breakpoint removal
This partially reverts 38ec4dd6ae
.
After using the new, "correct" behavior for some time I am
convinced that the original felt indeed better.
Change-Id: Ia921ccf8410bec33eb3053dc91bcca7b0328ef38
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -2593,14 +2593,6 @@ void GdbEngine::handleBreakInsert2(const DebuggerResponse &response, Breakpoint
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::handleBreakDelete(const DebuggerResponse &response, Breakpoint bp)
|
|
||||||
{
|
|
||||||
if (response.resultClass == ResultDone)
|
|
||||||
bp.notifyBreakpointRemoveOk();
|
|
||||||
else
|
|
||||||
bp.notifyBreakpointRemoveFailed();
|
|
||||||
}
|
|
||||||
|
|
||||||
void GdbEngine::handleBreakDisable(const DebuggerResponse &response, Breakpoint bp)
|
void GdbEngine::handleBreakDisable(const DebuggerResponse &response, Breakpoint bp)
|
||||||
{
|
{
|
||||||
QTC_CHECK(response.resultClass == ResultDone);
|
QTC_CHECK(response.resultClass == ResultDone);
|
||||||
@@ -2882,8 +2874,14 @@ void GdbEngine::removeBreakpoint(Breakpoint bp)
|
|||||||
bp.notifyBreakpointRemoveProceeding();
|
bp.notifyBreakpointRemoveProceeding();
|
||||||
showMessage(_("DELETING BP %1 IN %2").arg(br.id.toString()).arg(bp.fileName()));
|
showMessage(_("DELETING BP %1 IN %2").arg(br.id.toString()).arg(bp.fileName()));
|
||||||
postCommand("-break-delete " + br.id.toByteArray(),
|
postCommand("-break-delete " + br.id.toByteArray(),
|
||||||
NeedsStop | RebuildBreakpointModel,
|
NeedsStop | RebuildBreakpointModel);
|
||||||
[this, bp](const DebuggerResponse &r) { handleBreakDelete(r, bp); });
|
|
||||||
|
// Pretend it succeeds without waiting for response. Feels better.
|
||||||
|
// Otherwise, clicking in the gutter leaves the breakpoint visible
|
||||||
|
// for quite some time, so the user assumes a mis-click and clicks
|
||||||
|
// again, effectivly re-introducing the breakpoint.
|
||||||
|
bp.notifyBreakpointRemoveOk();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Breakpoint was scheduled to be inserted, but we haven't had
|
// Breakpoint was scheduled to be inserted, but we haven't had
|
||||||
// an answer so far. Postpone activity by doing nothing.
|
// an answer so far. Postpone activity by doing nothing.
|
||||||
|
@@ -287,7 +287,6 @@ private: ////////// View & Data Stuff //////////
|
|||||||
void handleBreakEnable(const DebuggerResponse &response, Breakpoint bp);
|
void handleBreakEnable(const DebuggerResponse &response, Breakpoint bp);
|
||||||
void handleBreakInsert1(const DebuggerResponse &response, Breakpoint bp);
|
void handleBreakInsert1(const DebuggerResponse &response, Breakpoint bp);
|
||||||
void handleBreakInsert2(const DebuggerResponse &response, Breakpoint bp);
|
void handleBreakInsert2(const DebuggerResponse &response, Breakpoint bp);
|
||||||
void handleBreakDelete(const DebuggerResponse &response, Breakpoint bp);
|
|
||||||
void handleBreakCondition(const DebuggerResponse &response, Breakpoint bp);
|
void handleBreakCondition(const DebuggerResponse &response, Breakpoint bp);
|
||||||
void handleBreakThreadSpec(const DebuggerResponse &response, Breakpoint bp);
|
void handleBreakThreadSpec(const DebuggerResponse &response, Breakpoint bp);
|
||||||
void handleBreakLineNumber(const DebuggerResponse &response, Breakpoint bp);
|
void handleBreakLineNumber(const DebuggerResponse &response, Breakpoint bp);
|
||||||
|
Reference in New Issue
Block a user