Commit 37bd3eab authored by hjk's avatar hjk
Browse files

Debugger: Visually fake instant breakpoint removal

This partially reverts 38ec4dd6

.
After using the new, "correct" behavior for some time I am
convinced that the original felt indeed better.

Change-Id: Ia921ccf8410bec33eb3053dc91bcca7b0328ef38
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 592ffe73
......@@ -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)
{
QTC_CHECK(response.resultClass == ResultDone);
......@@ -2882,8 +2874,14 @@ void GdbEngine::removeBreakpoint(Breakpoint bp)
bp.notifyBreakpointRemoveProceeding();
showMessage(_("DELETING BP %1 IN %2").arg(br.id.toString()).arg(bp.fileName()));
postCommand("-break-delete " + br.id.toByteArray(),
NeedsStop | RebuildBreakpointModel,
[this, bp](const DebuggerResponse &r) { handleBreakDelete(r, bp); });
NeedsStop | RebuildBreakpointModel);
// 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 {
// Breakpoint was scheduled to be inserted, but we haven't had
// 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 handleBreakInsert1(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 handleBreakThreadSpec(const DebuggerResponse &response, Breakpoint bp);
void handleBreakLineNumber(const DebuggerResponse &response, Breakpoint bp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment