diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp index 06ad5e68cc0aec8784abec3a832113da9142e75d..68274489468bbdd2f9bcdba24a6e604f281f793d 100644 --- a/src/plugins/debugger/debuggermanager.cpp +++ b/src/plugins/debugger/debuggermanager.cpp @@ -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")); @@ -1052,10 +1054,9 @@ void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp) emit debuggingFinished(); // Create Message box with possibility to go to settings 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); + arg(d->m_startParameters->executable, toolChainName, errorMessage); + Core::ICore::instance()->showWarningWithOptions(tr("Warning"), msg, QString(), + 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 diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 8a71f6f2434fa7b0895ccb4c8ecac7939e32ef09..3aaf948e0eb416eadb5556d81bfb3fec4095651a 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -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()));