summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/breakhandler.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-10-16 07:11:57 +0200
committerEike Ziller <eike.ziller@qt.io>2018-10-16 07:11:57 +0200
commit511bd64f3f7c5312ed180d58d8be8be327b2f59e (patch)
tree5e17044abd82c0d814a25d384254ac7122f9f0ba /src/plugins/debugger/breakhandler.cpp
parent683e7aa6cff84171359384d861f160115921e632 (diff)
parentf612833d83f527cc3bcb394d689e93ab51c88e71 (diff)
downloadqt-creator-511bd64f3f7c5312ed180d58d8be8be327b2f59e.tar.gz
Merge remote-tracking branch 'origin/4.8'
Change-Id: I0ff6f659b7ccd4ff5a79e422a1d54488508fe05f
Diffstat (limited to 'src/plugins/debugger/breakhandler.cpp')
-rw-r--r--src/plugins/debugger/breakhandler.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index 1a91885b4c..9a8ba32fa1 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -1557,8 +1557,11 @@ bool BreakHandler::setData(const QModelIndex &idx, const QVariant &value, int ro
const bool isEnabled = (bps.isEmpty() && sbps.isEmpty())
|| (!bps.isEmpty() && bps.at(0)->isEnabled())
|| (!sbps.isEmpty() && sbps.at(0)->params.enabled);
- for (Breakpoint bp : bps)
+ for (Breakpoint bp : bps) {
requestBreakpointEnabling(bp, !isEnabled);
+ if (GlobalBreakpoint gbp = bp->globalBreakpoint())
+ gbp->setEnabled(!isEnabled, false);
+ }
for (SubBreakpoint sbp : sbps)
requestSubBreakpointEnabling(sbp, !isEnabled);
return true;
@@ -1642,8 +1645,11 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
: breakpointsEnabled ? tr("Disable Breakpoint") : tr("Enable Breakpoint"),
!selectedBreakpoints.isEmpty(),
[this, selectedBreakpoints, breakpointsEnabled] {
- for (Breakpoint bp : selectedBreakpoints)
+ for (Breakpoint bp : selectedBreakpoints) {
requestBreakpointEnabling(bp, !breakpointsEnabled);
+ if (GlobalBreakpoint gbp = bp->globalBreakpoint())
+ gbp->setEnabled(!breakpointsEnabled, false);
+ }
}
);
@@ -2311,18 +2317,20 @@ void GlobalBreakpointItem::updateMarker()
m_marker->setToolTip(toolTip());
}
-void GlobalBreakpointItem::setEnabled(bool enabled)
+void GlobalBreakpointItem::setEnabled(bool enabled, bool descend)
{
QTC_CHECK(m_params.enabled != enabled);
m_params.enabled = enabled;
updateMarkerIcon();
update();
- for (QPointer<DebuggerEngine> engine : EngineManager::engines()) {
- BreakHandler *handler = engine->breakHandler();
- for (Breakpoint bp : handler->breakpoints()) {
- if (bp->globalBreakpoint() == this)
- handler->requestBreakpointEnabling(bp, enabled);
+ if (descend) {
+ for (QPointer<DebuggerEngine> engine : EngineManager::engines()) {
+ BreakHandler *handler = engine->breakHandler();
+ for (Breakpoint bp : handler->breakpoints()) {
+ if (bp->globalBreakpoint() == this)
+ handler->requestBreakpointEnabling(bp, enabled);
+ }
}
}
}