forked from qt-creator/qt-creator
debugger: re-enable the 'Reset Debugger' action, renamed into 'Abort Debugging'
This commit is contained in:
@@ -469,7 +469,9 @@ void DebuggerManager::init()
|
|||||||
d->m_actions.stopAction = new QAction(tr("Interrupt"), this);
|
d->m_actions.stopAction = new QAction(tr("Interrupt"), this);
|
||||||
d->m_actions.stopAction->setIcon(d->m_interruptSmallIcon);
|
d->m_actions.stopAction->setIcon(d->m_interruptSmallIcon);
|
||||||
|
|
||||||
d->m_actions.resetAction = new QAction(tr("Reset Debugger"), this);
|
d->m_actions.resetAction = new QAction(tr("Abort Debugging"), this);
|
||||||
|
d->m_actions.resetAction->setToolTip(tr("Aborts debugging and "
|
||||||
|
"resets the debugger to the initial state."));
|
||||||
|
|
||||||
d->m_actions.nextAction = new QAction(tr("Step Over"), this);
|
d->m_actions.nextAction = new QAction(tr("Step Over"), this);
|
||||||
d->m_actions.nextAction->setIcon(QIcon(":/debugger/images/debugger_stepover_small.png"));
|
d->m_actions.nextAction->setIcon(QIcon(":/debugger/images/debugger_stepover_small.png"));
|
||||||
@@ -1052,10 +1054,9 @@ void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp)
|
|||||||
emit debuggingFinished();
|
emit debuggingFinished();
|
||||||
// Create Message box with possibility to go to settings
|
// Create Message box with possibility to go to settings
|
||||||
const QString msg = tr("Cannot debug '%1' (tool chain: '%2'): %3").
|
const QString msg = tr("Cannot debug '%1' (tool chain: '%2'): %3").
|
||||||
arg(d->m_startParameters->executable, toolChainName, errorMessage);
|
arg(d->m_startParameters->executable, toolChainName, errorMessage);
|
||||||
Core::ICore::instance()->showWarningWithOptions(tr("Warning"), msg, QString(),
|
Core::ICore::instance()->showWarningWithOptions(tr("Warning"), msg, QString(),
|
||||||
QLatin1String(DEBUGGER_SETTINGS_CATEGORY),
|
QLatin1String(DEBUGGER_SETTINGS_CATEGORY), settingsIdHint);
|
||||||
settingsIdHint);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1066,8 +1067,10 @@ void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp)
|
|||||||
d->m_engine->startDebugger(d->m_startParameters);
|
d->m_engine->startDebugger(d->m_startParameters);
|
||||||
|
|
||||||
const unsigned engineCapabilities = d->m_engine->debuggerCapabilities();
|
const unsigned engineCapabilities = d->m_engine->debuggerCapabilities();
|
||||||
theDebuggerAction(OperateByInstruction)->setEnabled(engineCapabilities & DisassemblerCapability);
|
theDebuggerAction(OperateByInstruction)
|
||||||
d->m_actions.reverseDirectionAction->setEnabled(engineCapabilities & ReverseSteppingCapability);
|
->setEnabled(engineCapabilities & DisassemblerCapability);
|
||||||
|
d->m_actions.reverseDirectionAction
|
||||||
|
->setEnabled(engineCapabilities & ReverseSteppingCapability);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::startFailed()
|
void DebuggerManager::startFailed()
|
||||||
@@ -1739,7 +1742,8 @@ void DebuggerManager::setState(DebuggerState state, bool forced)
|
|||||||
d->m_actions.watchAction1->setEnabled(true);
|
d->m_actions.watchAction1->setEnabled(true);
|
||||||
d->m_actions.watchAction2->setEnabled(true);
|
d->m_actions.watchAction2->setEnabled(true);
|
||||||
d->m_actions.breakAction->setEnabled(true);
|
d->m_actions.breakAction->setEnabled(true);
|
||||||
d->m_actions.snapshotAction->setEnabled(stopped && (engineCapabilities & SnapshotCapability));
|
d->m_actions.snapshotAction->setEnabled(
|
||||||
|
stopped && (engineCapabilities & SnapshotCapability));
|
||||||
|
|
||||||
const bool interruptIsExit = !running;
|
const bool interruptIsExit = !running;
|
||||||
if (interruptIsExit) {
|
if (interruptIsExit) {
|
||||||
@@ -1751,7 +1755,7 @@ void DebuggerManager::setState(DebuggerState state, bool forced)
|
|||||||
}
|
}
|
||||||
|
|
||||||
d->m_actions.stopAction->setEnabled(stoppable);
|
d->m_actions.stopAction->setEnabled(stoppable);
|
||||||
d->m_actions.resetAction->setEnabled(true);
|
d->m_actions.resetAction->setEnabled(state != DebuggerNotReady);
|
||||||
|
|
||||||
d->m_actions.stepAction->setEnabled(stopped);
|
d->m_actions.stepAction->setEnabled(stopped);
|
||||||
d->m_actions.stepOutAction->setEnabled(stopped);
|
d->m_actions.stepOutAction->setEnabled(stopped);
|
||||||
@@ -1777,7 +1781,6 @@ void DebuggerManager::setState(DebuggerState state, bool forced)
|
|||||||
|| state == DebuggerNotReady
|
|| state == DebuggerNotReady
|
||||||
|| state == InferiorUnrunnable;
|
|| state == InferiorUnrunnable;
|
||||||
setBusyCursor(!notbusy);
|
setBusyCursor(!notbusy);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DebuggerManager::debuggerActionsEnabled() const
|
bool DebuggerManager::debuggerActionsEnabled() const
|
||||||
|
|||||||
@@ -758,9 +758,9 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
cmd = am->registerAction(actions.resetAction,
|
cmd = am->registerAction(actions.resetAction,
|
||||||
Constants::RESET, globalcontext);
|
Constants::RESET, globalcontext);
|
||||||
cmd->setAttribute(Core::Command::CA_UpdateText);
|
cmd->setAttribute(Core::Command::CA_UpdateText);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::RESET_KEY));
|
//cmd->setDefaultKeySequence(QKeySequence(Constants::RESET_KEY));
|
||||||
cmd->setDefaultText(tr("Reset Debugger"));
|
cmd->setDefaultText(tr("Reset Debugger"));
|
||||||
//disabled mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
|
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
|
||||||
|
|
||||||
QAction *sep = new QAction(this);
|
QAction *sep = new QAction(this);
|
||||||
sep->setSeparator(true);
|
sep->setSeparator(true);
|
||||||
@@ -884,7 +884,8 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
m->addAction(m_toggleLockedAction);
|
m->addAction(m_toggleLockedAction);
|
||||||
m->addSeparator();
|
m->addSeparator();
|
||||||
|
|
||||||
QAction *resetToSimpleAction = viewsMenu->menu()->addAction(tr("Reset to default layout"));
|
QAction *resetToSimpleAction =
|
||||||
|
viewsMenu->menu()->addAction(tr("Reset to default layout"));
|
||||||
connect(resetToSimpleAction, SIGNAL(triggered()),
|
connect(resetToSimpleAction, SIGNAL(triggered()),
|
||||||
m_manager, SLOT(setSimpleDockWidgetArrangement()));
|
m_manager, SLOT(setSimpleDockWidgetArrangement()));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user