struct DebuggerActions
{
QAction *continueAction;
- QAction *stopAction; // on the application output button if "Stop" is possible
+ QAction *exitAction; // on the application output button if "Stop" is possible
QAction *interruptAction; // on the fat debug button if "Pause" is possible
QAction *undisturbableAction; // on the fat debug button if nothing can be done
QAction *resetAction; // FIXME: Should not be needed in a stable release
void handleExecExit()
{
- currentEngine()->exitInferior();
+ currentEngine()->exitDebugger();
}
void handleFrameDown()
QToolButton *m_reverseToolButton;
QIcon m_startIcon;
- QIcon m_stopIcon;
+ QIcon m_exitIcon;
QIcon m_continueIcon;
QIcon m_interruptIcon;
QIcon m_locationMarkIcon;
m_startIcon = QIcon(_(":/debugger/images/debugger_start_small.png"));
m_startIcon.addFile(__(":/debugger/images/debugger_start.png"));
- m_stopIcon = QIcon(_(":/debugger/images/debugger_stop_small.png"));
- m_stopIcon.addFile(__(":/debugger/images/debugger_stop.png"));
+ m_exitIcon = QIcon(_(":/debugger/images/debugger_stop_small.png"));
+ m_exitIcon.addFile(__(":/debugger/images/debugger_stop.png"));
m_continueIcon = QIcon(__(":/debugger/images/debugger_continue_small.png"));
m_continueIcon.addFile(__(":/debugger/images/debugger_continue.png"));
m_interruptIcon = QIcon(_(":/debugger/images/debugger_interrupt_small.png"));
act->setIcon(m_continueIcon);
connect(act, SIGNAL(triggered()), SLOT(handleExecContinue()));
- act = m_actions.stopAction = new QAction(tr("Stop Debugger"), this);
- act->setIcon(m_stopIcon);
+ act = m_actions.exitAction = new QAction(tr("Exit Debugger"), this);
+ act->setIcon(m_exitIcon);
connect(act, SIGNAL(triggered()), SLOT(handleExecExit()));
act = m_actions.interruptAction = new QAction(tr("Interrupt"), this);
cmd->setAttribute(Command::CA_Hide);
m_uiSwitcher->addMenuAction(cmd, AnyLanguage, CC::G_DEFAULT_ONE);
- cmd = am->registerAction(m_actions.stopAction,
+ cmd = am->registerAction(m_actions.exitAction,
Constants::STOP, globalcontext);
//cmd->setDefaultKeySequence(QKeySequence(Constants::STOP_KEY));
cmd->setDefaultText(tr("Stop Debugger"));
//m_actions.snapshotAction->setEnabled(false);
theDebuggerAction(OperateByInstruction)->setEnabled(false);
- m_actions.stopAction->setEnabled(false);
+ m_actions.exitAction->setEnabled(false);
m_actions.resetAction->setEnabled(false);
m_actions.stepAction->setEnabled(false);
// F5 starts debugging. It is "startable".
m_actions.interruptAction->setEnabled(false);
m_actions.continueAction->setEnabled(false);
- m_actions.stopAction->setEnabled(false);
+ m_actions.exitAction->setEnabled(false);
am->command(Constants::STOP)->setKeySequence(QKeySequence());
am->command(PE::DEBUG)->setKeySequence(QKeySequence(PE::DEBUG_KEY));
core->updateAdditionalContexts(m_anyContext, Context());
// F5 continues, Shift-F5 kills. It is "continuable".
m_actions.interruptAction->setEnabled(false);
m_actions.continueAction->setEnabled(true);
- m_actions.stopAction->setEnabled(true);
+ m_actions.exitAction->setEnabled(true);
am->command(Constants::STOP)->setKeySequence(QKeySequence(STOP_KEY));
am->command(PE::DEBUG)->setKeySequence(QKeySequence(PE::DEBUG_KEY));
core->updateAdditionalContexts(m_anyContext, m_continuableContext);
// Shift-F5 interrupts. It is also "interruptible".
m_actions.interruptAction->setEnabled(true);
m_actions.continueAction->setEnabled(false);
- m_actions.stopAction->setEnabled(false);
+ m_actions.exitAction->setEnabled(false);
am->command(Constants::STOP)->setKeySequence(QKeySequence());
am->command(PE::DEBUG)->setKeySequence(QKeySequence(STOP_KEY));
core->updateAdditionalContexts(m_anyContext, m_interruptibleContext);
// We don't want to do anything anymore.
m_actions.interruptAction->setEnabled(false);
m_actions.continueAction->setEnabled(false);
- m_actions.stopAction->setEnabled(false);
+ m_actions.exitAction->setEnabled(false);
am->command(Constants::STOP)->setKeySequence(QKeySequence());
am->command(PE::DEBUG)->setKeySequence(QKeySequence(PE::DEBUG_KEY));
//core->updateAdditionalContexts(m_anyContext, m_finishedContext);
// We don't want to do anything anymore.
m_actions.interruptAction->setEnabled(false);
m_actions.continueAction->setEnabled(false);
- m_actions.stopAction->setEnabled(true);
+ m_actions.exitAction->setEnabled(true);
am->command(Constants::STOP)->setKeySequence(QKeySequence(STOP_KEY));
am->command(PE::DEBUG)->setKeySequence(QKeySequence(STOP_KEY));
core->updateAdditionalContexts(m_anyContext, m_finishedContext);
// Everything else is "undisturbable".
m_actions.interruptAction->setEnabled(false);
m_actions.continueAction->setEnabled(false);
- m_actions.stopAction->setEnabled(false);
+ m_actions.exitAction->setEnabled(false);
am->command(Constants::STOP)->setKeySequence(QKeySequence());
am->command(PE::DEBUG)->setKeySequence(QKeySequence());
core->updateAdditionalContexts(m_anyContext, m_undisturbableContext);
#include "debuggeractions.h"
#include "debuggerconstants.h"
+#include "debuggerrunner.h"
#include <utils/qtcassert.h>
#include <utils/savedaction.h>
if (si.isEmpty())
si.append(currentIndex().sibling(currentIndex().row(), 0));
foreach (const QModelIndex &idx, normalizeIndexes(si))
- m_snapshotHandler->removeSnapshot(idx.row());
+ removeSnapshot(idx.row());
}
QTreeView::keyPressEvent(ev);
}
if (act == actCreate)
m_snapshotHandler->createSnapshot(idx.row());
else if (act == actRemove)
- m_snapshotHandler->removeSnapshot(idx.row());
+ removeSnapshot(idx.row());
else if (act == actAdjust)
resizeColumnsToContents();
else if (act == actAlwaysAdjust)
setAlwaysResizeColumnsToContents(!m_alwaysResizeColumnsToContents);
}
+void SnapshotWindow::removeSnapshot(int i)
+{
+ m_snapshotHandler->at(i)->stop();
+}
+
void SnapshotWindow::resizeColumnsToContents()
{
for (int i = model()->columnCount(); --i >= 0; )