forked from qt-creator/qt-creator
Debugger: Introduce a Ctrl-F9 shortcut to enable/disable breakpoints
Since "toggle" now becomes ambiguous, change "Toggle Breakpoint" to "Set or Remove Breakpoint" and add a new "Enable or Disable Breakpoint" Fixes: QTCREATORBUG-26788 Change-Id: I7902308298570360af202fced90bf44fc1a59adb Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -2490,7 +2490,7 @@ void BreakpointManager::createBreakpointForEngine(const BreakpointParameters &pa
|
||||
engine->breakHandler()->tryClaimBreakpoint(gbp);
|
||||
}
|
||||
|
||||
void BreakpointManager::toggleBreakpoint(const ContextData &location, const QString &tracePointMessage)
|
||||
void BreakpointManager::setOrRemoveBreakpoint(const ContextData &location, const QString &tracePointMessage)
|
||||
{
|
||||
QTC_ASSERT(location.isValid(), return);
|
||||
GlobalBreakpoint gbp = findBreakpointFromContext(location);
|
||||
@@ -2517,6 +2517,15 @@ void BreakpointManager::toggleBreakpoint(const ContextData &location, const QStr
|
||||
}
|
||||
}
|
||||
|
||||
void BreakpointManager::enableOrDisableBreakpoint(const ContextData &location)
|
||||
{
|
||||
QTC_ASSERT(location.isValid(), return);
|
||||
if (GlobalBreakpoint gbp = findBreakpointFromContext(location))
|
||||
gbp->setEnabled(!gbp->isEnabled());
|
||||
else
|
||||
setOrRemoveBreakpoint(location);
|
||||
}
|
||||
|
||||
GlobalBreakpoint BreakpointManager::findBreakpointFromContext(const ContextData &location)
|
||||
{
|
||||
int matchLevel = 0;
|
||||
|
||||
Reference in New Issue
Block a user