Debugger: Coordinate breakpoint rampdown

The update of the global came too early to properly check the
condition whether it is still used. So fully remove usage first,
then update, so the check operates on intended data.

Fixes: QTCREATORBUG-22284
Change-Id: Iecdbdc371396132c88d0918f7cb253cf2627e0e3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2019-04-11 09:35:22 +02:00
parent 50522c6e7a
commit 0a8a9f60e1

View File

@@ -2031,14 +2031,18 @@ void BreakHandler::setWatchpointAtExpression(const QString &exp)
void BreakHandler::releaseAllBreakpoints()
{
GlobalBreakpoints gbps;
for (Breakpoint bp : breakpoints()) {
bp->removeChildren();
bp->destroyMarker();
if (GlobalBreakpoint gbp = bp->globalBreakpoint())
gbp->updateMarker();
gbps.append(bp->globalBreakpoint());
}
clear();
// The now-unclaimed breakpoints are globally visible again.
// Make now-unclaimed breakpoints globally visible again.
for (GlobalBreakpoint gbp: qAsConst(gbps)) {
if (gbp)
gbp->updateMarker();
}
}
QString BreakpointItem::msgWatchpointByExpressionTriggered(const QString &expr) const