Commit 9cd64f51 authored by hjk's avatar hjk
Browse files

debugger: re-enable the 'Reset Debugger' action, renamed into 'Abort Debugging'

parent 931ef372
......@@ -469,7 +469,9 @@ void DebuggerManager::init()
d->m_actions.stopAction = new QAction(tr("Interrupt"), this);
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->setIcon(QIcon(":/debugger/images/debugger_stepover_small.png"));
......@@ -1054,8 +1056,7 @@ void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp)
const QString msg = tr("Cannot debug '%1' (tool chain: '%2'): %3").
arg(d->m_startParameters->executable, toolChainName, errorMessage);
Core::ICore::instance()->showWarningWithOptions(tr("Warning"), msg, QString(),
QLatin1String(DEBUGGER_SETTINGS_CATEGORY),
settingsIdHint);
QLatin1String(DEBUGGER_SETTINGS_CATEGORY), settingsIdHint);
return;
}
......@@ -1066,8 +1067,10 @@ void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp)
d->m_engine->startDebugger(d->m_startParameters);
const unsigned engineCapabilities = d->m_engine->debuggerCapabilities();
theDebuggerAction(OperateByInstruction)->setEnabled(engineCapabilities & DisassemblerCapability);
d->m_actions.reverseDirectionAction->setEnabled(engineCapabilities & ReverseSteppingCapability);
theDebuggerAction(OperateByInstruction)
->setEnabled(engineCapabilities & DisassemblerCapability);
d->m_actions.reverseDirectionAction
->setEnabled(engineCapabilities & ReverseSteppingCapability);
}
void DebuggerManager::startFailed()
......@@ -1739,7 +1742,8 @@ void DebuggerManager::setState(DebuggerState state, bool forced)
d->m_actions.watchAction1->setEnabled(true);
d->m_actions.watchAction2->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;
if (interruptIsExit) {
......@@ -1751,7 +1755,7 @@ void DebuggerManager::setState(DebuggerState state, bool forced)
}
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.stepOutAction->setEnabled(stopped);
......@@ -1777,7 +1781,6 @@ void DebuggerManager::setState(DebuggerState state, bool forced)
|| state == DebuggerNotReady
|| state == InferiorUnrunnable;
setBusyCursor(!notbusy);
}
bool DebuggerManager::debuggerActionsEnabled() const
......
......@@ -758,9 +758,9 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
cmd = am->registerAction(actions.resetAction,
Constants::RESET, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText);
cmd->setDefaultKeySequence(QKeySequence(Constants::RESET_KEY));
//cmd->setDefaultKeySequence(QKeySequence(Constants::RESET_KEY));
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);
sep->setSeparator(true);
......@@ -884,7 +884,8 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
m->addAction(m_toggleLockedAction);
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()),
m_manager, SLOT(setSimpleDockWidgetArrangement()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment