forked from qt-creator/qt-creator
debugger: don't store m_debugMenu container explicitly
This commit is contained in:
@@ -1402,7 +1402,6 @@ public:
|
||||
QSettings *m_coreSettings;
|
||||
bool m_gdbBinariesChanged;
|
||||
uint m_cmdLineEnabledEngines;
|
||||
ActionContainer *m_debugMenu;
|
||||
};
|
||||
|
||||
DebuggerPluginPrivate::DebuggerPluginPrivate(DebuggerPlugin *plugin)
|
||||
@@ -1457,7 +1456,6 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(DebuggerPlugin *plugin)
|
||||
|
||||
m_gdbBinariesChanged = true;
|
||||
m_cmdLineEnabledEngines = AllEngineTypes;
|
||||
m_debugMenu = 0;
|
||||
}
|
||||
|
||||
DebuggerPluginPrivate::~DebuggerPluginPrivate()
|
||||
@@ -2942,7 +2940,8 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
||||
connect(action(ExecuteCommand), SIGNAL(triggered()),
|
||||
SLOT(executeDebuggerCommand()));
|
||||
|
||||
m_debugMenu = am->actionContainer(ProjectExplorer::Constants::M_DEBUG);
|
||||
ActionContainer *debugMenu =
|
||||
am->actionContainer(ProjectExplorer::Constants::M_DEBUG);
|
||||
|
||||
// Cpp/Qml ui setup
|
||||
m_mainWindow = new DebuggerMainWindow;
|
||||
@@ -3119,13 +3118,13 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
||||
cmd = am->registerAction(m_detachAction,
|
||||
Constants::DETACH, globalcontext);
|
||||
cmd->setAttribute(Command::CA_Hide);
|
||||
m_debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
|
||||
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
|
||||
|
||||
cmd = am->registerAction(m_actions.exitAction,
|
||||
Constants::STOP, globalcontext);
|
||||
//cmd->setDefaultKeySequence(QKeySequence(Constants::STOP_KEY));
|
||||
cmd->setDefaultText(tr("Stop Debugger"));
|
||||
m_debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
|
||||
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
|
||||
|
||||
cmd = am->registerAction(m_actions.interruptAction,
|
||||
Constants::DEBUG, m_interruptibleContext);
|
||||
@@ -3139,110 +3138,97 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
||||
Constants::RESET, globalcontext);
|
||||
//cmd->setDefaultKeySequence(QKeySequence(Constants::RESET_KEY));
|
||||
cmd->setDefaultText(tr("Reset Debugger"));
|
||||
m_debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
|
||||
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
|
||||
|
||||
QAction *sep = new QAction(this);
|
||||
sep->setSeparator(true);
|
||||
cmd = am->registerAction(sep, _("Debugger.Sep.Step"), globalcontext);
|
||||
m_debugMenu->addAction(cmd);
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_actions.nextAction,
|
||||
Constants::NEXT, cppDebuggercontext);
|
||||
cmd->setDefaultKeySequence(QKeySequence(Constants::NEXT_KEY));
|
||||
cmd->setAttribute(Command::CA_Hide);
|
||||
m_debugMenu->addAction(cmd);
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_actions.stepAction,
|
||||
Constants::STEP, cppDebuggercontext);
|
||||
cmd->setDefaultKeySequence(QKeySequence(Constants::STEP_KEY));
|
||||
cmd->setAttribute(Command::CA_Hide);
|
||||
m_debugMenu->addAction(cmd);
|
||||
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_actions.stepOutAction,
|
||||
Constants::STEPOUT, cppDebuggercontext);
|
||||
cmd->setDefaultKeySequence(QKeySequence(Constants::STEPOUT_KEY));
|
||||
cmd->setAttribute(Command::CA_Hide);
|
||||
m_debugMenu->addAction(cmd);
|
||||
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_actions.runToLineAction,
|
||||
Constants::RUN_TO_LINE1, cppDebuggercontext);
|
||||
cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_LINE_KEY));
|
||||
cmd->setAttribute(Command::CA_Hide);
|
||||
m_debugMenu->addAction(cmd);
|
||||
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_actions.runToFunctionAction,
|
||||
Constants::RUN_TO_FUNCTION, cppDebuggercontext);
|
||||
cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_FUNCTION_KEY));
|
||||
cmd->setAttribute(Command::CA_Hide);
|
||||
m_debugMenu->addAction(cmd);
|
||||
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_actions.jumpToLineAction,
|
||||
Constants::JUMP_TO_LINE1, cppDebuggercontext);
|
||||
cmd->setAttribute(Command::CA_Hide);
|
||||
m_debugMenu->addAction(cmd);
|
||||
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_actions.returnFromFunctionAction,
|
||||
Constants::RETURN_FROM_FUNCTION, cppDebuggercontext);
|
||||
cmd->setAttribute(Command::CA_Hide);
|
||||
m_debugMenu->addAction(cmd);
|
||||
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_actions.reverseDirectionAction,
|
||||
Constants::REVERSE, cppDebuggercontext);
|
||||
cmd->setDefaultKeySequence(QKeySequence(Constants::REVERSE_KEY));
|
||||
cmd->setAttribute(Command::CA_Hide);
|
||||
m_debugMenu->addAction(cmd);
|
||||
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
sep = new QAction(this);
|
||||
sep->setSeparator(true);
|
||||
cmd = am->registerAction(sep, _("Debugger.Sep.Break"), globalcontext);
|
||||
m_debugMenu->addAction(cmd);
|
||||
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
//cmd = am->registerAction(m_actions.snapshotAction,
|
||||
// Constants::SNAPSHOT, cppDebuggercontext);
|
||||
//cmd->setDefaultKeySequence(QKeySequence(Constants::SNAPSHOT_KEY));
|
||||
//cmd->setAttribute(Command::CA_Hide);
|
||||
//m_debugMenu->addAction(cmd);
|
||||
//debugMenu->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_actions.frameDownAction,
|
||||
Constants::FRAME_DOWN, cppDebuggercontext);
|
||||
cmd = am->registerAction(m_actions.frameUpAction,
|
||||
Constants::FRAME_UP, cppDebuggercontext);
|
||||
|
||||
|
||||
cmd = am->registerAction(action(OperateByInstruction),
|
||||
Constants::OPERATE_BY_INSTRUCTION, cppDebuggercontext);
|
||||
cmd->setAttribute(Command::CA_Hide);
|
||||
m_debugMenu->addAction(cmd);
|
||||
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_actions.breakAction,
|
||||
Constants::TOGGLE_BREAK, globalcontext);
|
||||
cmd->setDefaultKeySequence(QKeySequence(Constants::TOGGLE_BREAK_KEY));
|
||||
m_debugMenu->addAction(cmd);
|
||||
debugMenu->addAction(cmd);
|
||||
connect(m_actions.breakAction, SIGNAL(triggered()),
|
||||
SLOT(toggleBreakpoint()));
|
||||
|
||||
//mcppcontext->addAction(cmd);
|
||||
|
||||
sep = new QAction(this);
|
||||
sep->setSeparator(true);
|
||||
cmd = am->registerAction(sep, _("Debugger.Sep.Watch"), globalcontext);
|
||||
m_debugMenu->addAction(cmd);
|
||||
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
cmd = am->registerAction(m_actions.watchAction1,
|
||||
Constants::ADD_TO_WATCH1, cppeditorcontext);
|
||||
cmd->action()->setEnabled(true);
|
||||
//cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+D,Ctrl+W")));
|
||||
m_debugMenu->addAction(cmd);
|
||||
debugMenu->addAction(cmd);
|
||||
|
||||
|
||||
// Editor context menu
|
||||
|
||||
Reference in New Issue
Block a user