forked from qt-creator/qt-creator
Debugger: Re-enable breakpoint enabling via gutter context menu
Task-number: QTCREATORBUG-20970 Change-Id: Ie8fc2af8e99e82018a9b4262fe6053cb714e7d60 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -2322,9 +2322,10 @@ void GlobalBreakpointItem::setEnabled(bool enabled)
|
|||||||
update();
|
update();
|
||||||
|
|
||||||
for (QPointer<DebuggerEngine> engine : EngineManager::engines()) {
|
for (QPointer<DebuggerEngine> engine : EngineManager::engines()) {
|
||||||
for (Breakpoint bp : engine->breakHandler()->breakpoints()) {
|
BreakHandler *handler = engine->breakHandler();
|
||||||
|
for (Breakpoint bp : handler->breakpoints()) {
|
||||||
if (bp->globalBreakpoint() == this)
|
if (bp->globalBreakpoint() == this)
|
||||||
bp->setEnabled(enabled);
|
handler->requestBreakpointEnabling(bp, enabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -312,6 +312,7 @@ public:
|
|||||||
static void claimBreakpointsForEngine(DebuggerEngine *engine);
|
static void claimBreakpointsForEngine(DebuggerEngine *engine);
|
||||||
static void toggleBreakpoint(const ContextData &location, const QString &tracePointMessage = QString());
|
static void toggleBreakpoint(const ContextData &location, const QString &tracePointMessage = QString());
|
||||||
static void createBreakpointForEngine(const BreakpointParameters &data, DebuggerEngine *engine);
|
static void createBreakpointForEngine(const BreakpointParameters &data, DebuggerEngine *engine);
|
||||||
|
static void editBreakpoint(const GlobalBreakpoint &gbp, QWidget *parent);
|
||||||
|
|
||||||
static void executeAddBreakpointDialog();
|
static void executeAddBreakpointDialog();
|
||||||
static void executeDeleteAllBreakpointsDialog();
|
static void executeDeleteAllBreakpointsDialog();
|
||||||
@@ -326,7 +327,6 @@ private:
|
|||||||
|
|
||||||
bool contextMenuEvent(const Utils::ItemViewEvent &ev);
|
bool contextMenuEvent(const Utils::ItemViewEvent &ev);
|
||||||
void gotoLocation(const GlobalBreakpoint &gbp) const;
|
void gotoLocation(const GlobalBreakpoint &gbp) const;
|
||||||
void editBreakpoint(const GlobalBreakpoint &gbp, QWidget *parent);
|
|
||||||
void editBreakpoints(const GlobalBreakpoints &gbps, QWidget *parent);
|
void editBreakpoints(const GlobalBreakpoints &gbps, QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1913,20 +1913,20 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditorWidget *widget,
|
|||||||
auto act = menu->addAction(tr("Remove Breakpoint"));
|
auto act = menu->addAction(tr("Remove Breakpoint"));
|
||||||
connect(act, &QAction::triggered, [gbp] { gbp->deleteBreakpoint(); });
|
connect(act, &QAction::triggered, [gbp] { gbp->deleteBreakpoint(); });
|
||||||
|
|
||||||
// // Enable/disable existing breakpoint.
|
// Enable/disable existing breakpoint.
|
||||||
// if (gbp->isEnabled()) {
|
if (gbp->isEnabled()) {
|
||||||
// act = menu->addAction(tr("Disable Breakpoint %1").arg(id));
|
act = menu->addAction(tr("Disable Breakpoint"));
|
||||||
// connect(act, &QAction::triggered, [gbp] { gbp.setEnabled(false); });
|
connect(act, &QAction::triggered, [gbp] { gbp->setEnabled(false); });
|
||||||
// } else {
|
} else {
|
||||||
// act = menu->addAction(tr("Enable Breakpoint %1").arg(id));
|
act = menu->addAction(tr("Enable Breakpoint"));
|
||||||
// connect(act, &QAction::triggered, [gbp] { gbp.setEnabled(true); });
|
connect(act, &QAction::triggered, [gbp] { gbp->setEnabled(true); });
|
||||||
// }
|
}
|
||||||
|
|
||||||
// // Edit existing breakpoint.
|
// Edit existing breakpoint.
|
||||||
// act = menu->addAction(tr("Edit Breakpoint %1...").arg(id));
|
act = menu->addAction(tr("Edit Breakpoint ..."));
|
||||||
// connect(act, &QAction::triggered, [gbp] {
|
connect(act, &QAction::triggered, [gbp] {
|
||||||
// globalBreakHandler()->editBreakpoint(gbp, ICore::dialogParent());
|
BreakpointManager::editBreakpoint(gbp, ICore::dialogParent());
|
||||||
// });
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Handle non-existing breakpoint.
|
// Handle non-existing breakpoint.
|
||||||
|
Reference in New Issue
Block a user