diff options
author | hjk <hjk@qt.io> | 2019-04-11 09:35:22 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-04-11 08:14:30 +0000 |
commit | 0a8a9f60e1343d99d0d48e46e294c5bcd1bc300e (patch) | |
tree | 843a966dad2b03ef9e5466585bca517d96531e84 | |
parent | 50522c6e7a28725c0e6556545ded5eedd6bb76c0 (diff) |
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>
-rw-r--r-- | src/plugins/debugger/breakhandler.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 6e0ac9a7ff..481c123046 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -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 |