Commit f820f10b authored by hjk's avatar hjk
Browse files

debugger: code cosmetics



Namespaces, whitespace.

Change-Id: I83df57b32a1a31b208181d65849688c09941a0be
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent ebe62299
......@@ -77,6 +77,7 @@
#include <QVariant>
#include <QVBoxLayout>
using namespace Core;
using namespace ProjectExplorer;
using namespace Utils;
......@@ -192,12 +193,12 @@ class AttachCoreDialogPrivate
{
public:
QLabel *execLabel;
Utils::PathChooser *execFileName;
PathChooser *execFileName;
QLabel *coreLabel;
Utils::PathChooser *coreFileName;
PathChooser *coreFileName;
QLabel *profileLabel;
ProfileChooser *profileComboBox;
Utils::PathChooser *overrideStartScriptFileName;
PathChooser *overrideStartScriptFileName;
QLabel *overrideStartScriptLabel;
QDialogButtonBox *buttonBox;
};
......@@ -208,19 +209,19 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Debugger"));
d->coreFileName = new Utils::PathChooser(this);
d->coreFileName = new PathChooser(this);
d->coreFileName->setExpectedKind(PathChooser::File);
d->coreFileName->setPromptDialogTitle(tr("Select Core File"));
d->coreLabel = new QLabel(tr("&Core file:"), this);
d->coreLabel->setBuddy(d->coreFileName);
d->execFileName = new Utils::PathChooser(this);
d->execFileName = new PathChooser(this);
d->execFileName->setExpectedKind(PathChooser::File);
d->execFileName->setPromptDialogTitle(tr("Select Executable"));
d->execLabel = new QLabel(tr("&Executable:"), this);
d->execLabel->setBuddy(d->execFileName);
d->overrideStartScriptFileName = new Utils::PathChooser(this);
d->overrideStartScriptFileName = new PathChooser(this);
d->overrideStartScriptFileName->setExpectedKind(PathChooser::File);
d->overrideStartScriptFileName->setPromptDialogTitle(tr("Select Startup Script"));
d->overrideStartScriptLabel = new QLabel(tr("Override &start script:"), this);
......@@ -286,7 +287,7 @@ void AttachCoreDialog::setCoreFile(const QString &fileName)
changed();
}
Core::Id AttachCoreDialog::profileId() const
Id AttachCoreDialog::profileId() const
{
return d->profileComboBox->currentProfileId();
}
......@@ -334,7 +335,7 @@ class AttachExternalDialogPrivate
public:
QLabel *pidLabel;
QLineEdit *pidLineEdit;
Utils::FilterLineEdit *filterWidget;
FilterLineEdit *filterWidget;
QLabel *profileLabel;
ProfileChooser *profileComboBox;
QTreeView *procView;
......@@ -360,7 +361,7 @@ AttachExternalDialog::AttachExternalDialog(QWidget *parent)
d->pidLabel = new QLabel(tr("Attach to &process ID:"), this);
d->pidLabel->setBuddy(d->pidLineEdit);
d->filterWidget = new Utils::FilterLineEdit(this);
d->filterWidget = new FilterLineEdit(this);
d->filterWidget->setFocus(Qt::TabFocusReason);
d->profileComboBox = new ProfileChooser(this, true);
......@@ -479,7 +480,7 @@ QString AttachExternalDialog::executable() const
return d->model->executableForPid(attachPIDText());
}
Core::Id AttachExternalDialog::profileId() const
Id AttachExternalDialog::profileId() const
{
return d->profileComboBox->currentProfileId();
}
......@@ -611,13 +612,13 @@ class StartExternalDialogPrivate
{
public:
QLabel *execLabel;
Utils::PathChooser *execFile;
PathChooser *execFile;
QLabel *argsLabel;
QLineEdit *argsEdit;
QLabel *runInTerminalLabel;
QCheckBox *runInTerminalCheckBox;
QLabel *workingDirectoryLabel;
Utils::PathChooser *workingDirectory;
PathChooser *workingDirectory;
QLabel *profileLabel;
ProfileChooser *profileChooser;
QLabel *breakAtMainLabel;
......@@ -635,9 +636,9 @@ StartExternalDialog::StartExternalDialog(QWidget *parent)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Debugger"));
QSettings *settings = Core::ICore::settings();
QSettings *settings = ICore::settings();
d->execFile = new Utils::PathChooser(this);
d->execFile = new PathChooser(this);
d->execFile->setExpectedKind(PathChooser::File);
d->execFile->setPromptDialogTitle(tr("Select Executable"));
d->execFile->lineEdit()->setCompleter(
......@@ -650,7 +651,7 @@ StartExternalDialog::StartExternalDialog(QWidget *parent)
d->argsLabel = new QLabel(tr("&Arguments:"), this);
d->argsLabel->setBuddy(d->argsEdit);
d->workingDirectory = new Utils::PathChooser(this);
d->workingDirectory = new PathChooser(this);
d->workingDirectory->setExpectedKind(PathChooser::ExistingDirectory);
d->workingDirectory->setPromptDialogTitle(tr("Select Working Directory"));
d->workingDirectory->lineEdit()->setCompleter(
......@@ -771,7 +772,7 @@ QString StartExternalDialog::executableFile() const
return d->execFile->path();
}
Core::Id StartExternalDialog::profileId() const
Id StartExternalDialog::profileId() const
{
return d->profileChooser->currentProfileId();
}
......@@ -888,7 +889,7 @@ public:
QString overrideStartScript;
bool useServerStartScript;
QString serverStartScript;
Core::Id profileId;
Id profileId;
QString debugInfoLocation;
};
......@@ -944,9 +945,9 @@ void StartRemoteParameters::fromSettings(const QSettings *settings)
localExecutable = settings->value(_("LastLocalExecutable")).toString();
const QString profileIdString = settings->value(_("LastProfileId")).toString();
if (profileIdString.isEmpty()) {
profileId = Core::Id();
profileId = Id();
} else {
profileId = Core::Id(profileIdString);
profileId = Id(profileIdString);
}
remoteArchitecture = settings->value(_("LastRemoteArchitecture")).toString();
serverStartScript = settings->value(_("LastServerStartScript")).toString();
......@@ -962,19 +963,19 @@ public:
QLabel *profileLabel;
ProfileChooser *profileChooser;
QLabel *executableLabel;
Utils::PathChooser *executablePathChooser;
PathChooser *executablePathChooser;
QLabel *channelLabel;
QLineEdit *channelLineEdit;
QLabel *architectureLabel;
QComboBox *architectureComboBox;
QLabel *debuginfoLabel;
Utils::PathChooser *debuginfoPathChooser;
PathChooser *debuginfoPathChooser;
QLabel *overrideStartScriptLabel;
Utils::PathChooser *overrideStartScriptPathChooser;
PathChooser *overrideStartScriptPathChooser;
QLabel *useServerStartScriptLabel;
QCheckBox *useServerStartScriptCheckBox;
QLabel *serverStartScriptLabel;
Utils::PathChooser *serverStartScriptPathChooser;
PathChooser *serverStartScriptPathChooser;
QLabel *historyLabel;
QComboBox *historyComboBox;
QDialogButtonBox *buttonBox;
......@@ -991,7 +992,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent, bool enableStartScript)
d->profileLabel = new QLabel(tr("Target:"), this);
d->profileLabel->setBuddy(d->profileChooser);
d->executablePathChooser = new Utils::PathChooser(this);
d->executablePathChooser = new PathChooser(this);
d->executablePathChooser->setExpectedKind(PathChooser::File);
d->executablePathChooser->setPromptDialogTitle(tr("Select Executable"));
d->executableLabel = new QLabel(tr("Local &executable:"));
......@@ -1007,12 +1008,12 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent, bool enableStartScript)
d->architectureLabel = new QLabel(tr("&Architecture:"), this);
d->architectureLabel->setBuddy(d->architectureComboBox);
d->debuginfoPathChooser = new Utils::PathChooser(this);
d->debuginfoPathChooser = new PathChooser(this);
d->debuginfoPathChooser->setPromptDialogTitle(tr("Select Location of Debugging Information"));
d->debuginfoLabel = new QLabel(tr("Location of debugging &information:"), this);
d->debuginfoLabel->setBuddy(d->debuginfoPathChooser);
d->overrideStartScriptPathChooser = new Utils::PathChooser(this);
d->overrideStartScriptPathChooser = new PathChooser(this);
d->overrideStartScriptPathChooser->setExpectedKind(PathChooser::File);
d->overrideStartScriptPathChooser->setPromptDialogTitle(tr("Select GDB Start Script"));
d->overrideStartScriptLabel = new QLabel(tr("Override host GDB s&tart script:"), this);
......@@ -1023,7 +1024,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent, bool enableStartScript)
d->useServerStartScriptLabel = new QLabel(tr("&Use server start script:"), this);
d->useServerStartScriptLabel->setVisible(enableStartScript);
d->serverStartScriptPathChooser = new Utils::PathChooser(this);
d->serverStartScriptPathChooser = new PathChooser(this);
d->serverStartScriptPathChooser->setExpectedKind(PathChooser::File);
d->serverStartScriptPathChooser->setPromptDialogTitle(tr("Select Server Start Script"));
d->serverStartScriptPathChooser->setVisible(enableStartScript);
......@@ -1171,7 +1172,7 @@ void StartRemoteDialog::historyIndexChanged(int index)
setParameters(v.value<StartRemoteParameters>());
}
Core::Id StartRemoteDialog::profileId() const
Id StartRemoteDialog::profileId() const
{
return d->profileChooser->currentProfileId();
}
......@@ -1273,12 +1274,12 @@ int AttachToQmlPortDialog::port() const
return d->portSpinBox->value();
}
Core::Id AttachToQmlPortDialog::profileId() const
Id AttachToQmlPortDialog::profileId() const
{
return d->profileChooser->currentProfileId();
}
void AttachToQmlPortDialog::setProfileId(const Core::Id &id)
void AttachToQmlPortDialog::setProfileId(const Id &id)
{
d->profileChooser->setCurrentProfileId(id);
}
......@@ -1465,7 +1466,7 @@ public:
StartRemoteEngineDialog::StartRemoteEngineDialog(QWidget *parent)
: QDialog(parent), d(new StartRemoteEngineDialogPrivate)
{
QSettings *settings = Core::ICore::settings();
QSettings *settings = ICore::settings();
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Remote Engine"));
......
......@@ -458,12 +458,12 @@ static QToolButton *toolButton(QAction *action)
static void setProxyAction(Utils::ProxyAction *proxy, const char *id)
{
proxy->setAction(Core::ActionManager::command(id)->action());
proxy->setAction(ActionManager::command(id)->action());
}
static QToolButton *toolButton(const char *id)
{
return toolButton(Core::ActionManager::command(id)->action());
return toolButton(ActionManager::command(id)->action());
}
///////////////////////////////////////////////////////////////////////
......@@ -546,7 +546,7 @@ public:
//
///////////////////////////////////////////////////////////////////////
void fillParameters(DebuggerStartParameters *sp, Core::Id id)
void fillParameters(DebuggerStartParameters *sp, Id id)
{
Profile *profile = ProfileManager::instance()->find(id);
QTC_ASSERT(profile, return);
......@@ -559,7 +559,7 @@ void fillParameters(DebuggerStartParameters *sp, Core::Id id)
static TextEditor::ITextEditor *currentTextEditor()
{
return qobject_cast<TextEditor::ITextEditor *>(Core::EditorManager::currentEditor());
return qobject_cast<TextEditor::ITextEditor *>(EditorManager::currentEditor());
}
static bool currentTextEditorPosition(ContextData *data)
......@@ -567,7 +567,7 @@ static bool currentTextEditorPosition(ContextData *data)
TextEditor::ITextEditor *textEditor = currentTextEditor();
if (!textEditor)
return false;
const Core::IDocument *document = textEditor->document();
const IDocument *document = textEditor->document();
QTC_ASSERT(document, return false);
data->fileName = document->fileName();
if (textEditor->property("DisassemblerView").toBool()) {
......@@ -777,7 +777,7 @@ public slots:
void attachToQmlPort();
void startRemoteEngine();
void attachExternalApplication();
Q_SLOT void attachExternalApplication(ProjectExplorer::RunControl*rc);
Q_SLOT void attachExternalApplication(ProjectExplorer::RunControl *rc);
void runScheduled();
void attachCore();
void attachToRemoteServer(const QString &spec);
......@@ -1898,7 +1898,7 @@ void DebuggerPluginPrivate::editorOpened(IEditor *editor)
SLOT(requestContextMenu(TextEditor::ITextEditor*,int,QMenu*)));
}
void DebuggerPluginPrivate::updateBreakMenuItem(Core::IEditor *editor)
void DebuggerPluginPrivate::updateBreakMenuItem(IEditor *editor)
{
ITextEditor *textEditor = qobject_cast<ITextEditor *>(editor);
m_breakAction->setEnabled(textEditor != 0);
......@@ -2992,16 +2992,16 @@ void DebuggerPluginPrivate::extensionsInitialized()
qmlSelectDummyAction->setCheckable(true);
qmlSelectDummyAction->setIcon(QIcon(_(":/debugger/images/qml/select.png")));
qmlSelectDummyAction->setEnabled(false);
Core::ActionManager::registerAction(qmlSelectDummyAction, Constants::QML_SELECTTOOL, globalcontext);
ActionManager::registerAction(qmlSelectDummyAction, Constants::QML_SELECTTOOL, globalcontext);
QAction *qmlZoomDummyAction = new QAction(tr("Zoom"), this);
qmlZoomDummyAction->setCheckable(true);
qmlZoomDummyAction->setIcon(QIcon(_(":/debugger/images/qml/zoom.png")));
qmlZoomDummyAction->setEnabled(false);
Core::ActionManager::registerAction(qmlZoomDummyAction, Constants::QML_ZOOMTOOL, globalcontext);
ActionManager::registerAction(qmlZoomDummyAction, Constants::QML_ZOOMTOOL, globalcontext);
ActionContainer *debugMenu =
Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_DEBUG);
ActionManager::actionContainer(ProjectExplorer::Constants::M_DEBUG);
// Dock widgets
QDockWidget *dock = 0;
......@@ -3122,9 +3122,9 @@ void DebuggerPluginPrivate::extensionsInitialized()
// G_START_QML
Command *cmd = 0;
ActionContainer *mstart = Core::ActionManager::actionContainer(PE::M_DEBUG_STARTDEBUGGING);
ActionContainer *mstart = ActionManager::actionContainer(PE::M_DEBUG_STARTDEBUGGING);
cmd = Core::ActionManager::registerAction(m_startAction, Constants::DEBUG, globalcontext);
cmd = ActionManager::registerAction(m_startAction, Constants::DEBUG, globalcontext);
cmd->setDescription(tr("Start Debugging"));
cmd->setDefaultKeySequence(debugKey);
cmd->setAttribute(Command::CA_UpdateText);
......@@ -3137,17 +3137,17 @@ void DebuggerPluginPrivate::extensionsInitialized()
ModeManager::addAction(m_visibleStartAction, Constants::P_ACTION_DEBUG);
cmd = Core::ActionManager::registerAction(m_debugWithoutDeployAction,
cmd = ActionManager::registerAction(m_debugWithoutDeployAction,
"Debugger.DebugWithoutDeploy", globalcontext);
cmd->setAttribute(Command::CA_Hide);
mstart->addAction(cmd, CC::G_DEFAULT_ONE);
cmd = Core::ActionManager::registerAction(m_attachToLocalProcessAction,
cmd = ActionManager::registerAction(m_attachToLocalProcessAction,
"Debugger.AttachToLocalProcess", globalcontext);
cmd->setAttribute(Command::CA_Hide);
mstart->addAction(cmd, Constants::G_START_LOCAL);
cmd = Core::ActionManager::registerAction(m_startLocalProcessAction,
cmd = ActionManager::registerAction(m_startLocalProcessAction,
"Debugger.StartLocalProcess", globalcontext);
cmd->setAttribute(Command::CA_Hide);
mstart->addAction(cmd, Debugger::Constants::G_START_LOCAL);
......@@ -3159,45 +3159,45 @@ void DebuggerPluginPrivate::extensionsInitialized()
// m_startRemoteProcessAction->setVisible(on);
// m_startRemoteServerAction->setVisible(on);
cmd = Core::ActionManager::registerAction(m_attachToCoreAction,
cmd = ActionManager::registerAction(m_attachToCoreAction,
"Debugger.AttachCore", globalcontext);
cmd->setAttribute(Command::CA_Hide);
mstart->addAction(cmd, Constants::G_START_LOCAL);
cmd = Core::ActionManager::registerAction(m_attachToRemoteServerAction,
cmd = ActionManager::registerAction(m_attachToRemoteServerAction,
"Debugger.AttachToRemoteServer", globalcontext);
cmd->setAttribute(Command::CA_Hide);
mstart->addAction(cmd, Constants::G_MANUAL_REMOTE);
cmd = Core::ActionManager::registerAction(m_startRemoteProcessAction,
cmd = ActionManager::registerAction(m_startRemoteProcessAction,
"Debugger.StartRemoteProcess", globalcontext);
cmd->setAttribute(Command::CA_Hide);
mstart->addAction(cmd, Constants::G_MANUAL_REMOTE);
cmd = Core::ActionManager::registerAction(m_startRemoteServerAction,
cmd = ActionManager::registerAction(m_startRemoteServerAction,
"Debugger.StartRemoteServer", globalcontext);
cmd->setDescription(tr("Start Gdbserver"));
mstart->addAction(cmd, Constants::G_MANUAL_REMOTE);
cmd = Core::ActionManager::registerAction(m_attachToRemoteProcessAction,
cmd = ActionManager::registerAction(m_attachToRemoteProcessAction,
"Debugger.AttachToRemoteProcess", globalcontext);
cmd->setDescription(tr("Attach to Remote Process"));
mstart->addAction(cmd, Debugger::Constants::G_AUTOMATIC_REMOTE);
cmd = Core::ActionManager::registerAction(m_loadRemoteCoreAction,
cmd = ActionManager::registerAction(m_loadRemoteCoreAction,
"Debugger.LoadRemoteCore", globalcontext);
cmd->setDescription(tr("Load Remote Core File"));
mstart->addAction(cmd, Debugger::Constants::G_AUTOMATIC_REMOTE);
#ifdef WITH_LLDB
cmd = Core::ActionManager::registerAction(m_startRemoteLldbAction,
cmd = ActionManager::registerAction(m_startRemoteLldbAction,
"Debugger.RemoteLldb", globalcontext);
cmd->setAttribute(Command::CA_Hide);
mstart->addAction(cmd, Constants::G_MANUAL_REMOTE);
#endif
if (m_startRemoteCdbAction) {
cmd = Core::ActionManager::registerAction(m_startRemoteCdbAction,
cmd = ActionManager::registerAction(m_startRemoteCdbAction,
"Debugger.AttachRemoteCdb", globalcontext);
cmd->setAttribute(Command::CA_Hide);
mstart->addAction(cmd, Constants::G_MANUAL_REMOTE);
......@@ -3205,27 +3205,27 @@ void DebuggerPluginPrivate::extensionsInitialized()
mstart->addSeparator(globalcontext, Constants::G_START_QML);
cmd = Core::ActionManager::registerAction(m_attachToQmlPortAction,
cmd = ActionManager::registerAction(m_attachToQmlPortAction,
"Debugger.AttachToQmlPort", globalcontext);
cmd->setAttribute(Command::CA_Hide);
mstart->addAction(cmd, Constants::G_START_QML);
cmd = Core::ActionManager::registerAction(m_detachAction,
cmd = ActionManager::registerAction(m_detachAction,
"Debugger.Detach", globalcontext);
cmd->setAttribute(Command::CA_Hide);
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
cmd = Core::ActionManager::registerAction(m_interruptAction,
cmd = ActionManager::registerAction(m_interruptAction,
Constants::INTERRUPT, globalcontext);
cmd->setDescription(tr("Interrupt Debugger"));
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
cmd = Core::ActionManager::registerAction(m_continueAction,
cmd = ActionManager::registerAction(m_continueAction,
Constants::CONTINUE, globalcontext);
cmd->setDefaultKeySequence(debugKey);
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
cmd = Core::ActionManager::registerAction(m_exitAction,
cmd = ActionManager::registerAction(m_exitAction,
Constants::STOP, globalcontext);
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
m_hiddenStopAction = new Utils::ProxyAction(this);
......@@ -3233,44 +3233,44 @@ void DebuggerPluginPrivate::extensionsInitialized()
m_hiddenStopAction->setAttribute(Utils::ProxyAction::UpdateText);
m_hiddenStopAction->setAttribute(Utils::ProxyAction::UpdateIcon);
cmd = Core::ActionManager::registerAction(m_hiddenStopAction,
cmd = ActionManager::registerAction(m_hiddenStopAction,
Constants::HIDDEN_STOP, globalcontext);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Shift+Ctrl+Y") : tr("Shift+F5")));
cmd = Core::ActionManager::registerAction(m_abortAction,
cmd = ActionManager::registerAction(m_abortAction,
Constants::ABORT, globalcontext);
cmd->setDescription(tr("Reset Debugger"));
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
debugMenu->addSeparator(globalcontext);
cmd = Core::ActionManager::registerAction(m_nextAction,
cmd = ActionManager::registerAction(m_nextAction,
Constants::NEXT, globalcontext);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+O") : tr("F10")));
cmd->setAttribute(Command::CA_Hide);
cmd->setAttribute(Command::CA_UpdateText);
debugMenu->addAction(cmd);
cmd = Core::ActionManager::registerAction(m_stepAction,
cmd = ActionManager::registerAction(m_stepAction,
Constants::STEP, globalcontext);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+I") : tr("F11")));
cmd->setAttribute(Command::CA_Hide);
cmd->setAttribute(Command::CA_UpdateText);
debugMenu->addAction(cmd);
cmd = Core::ActionManager::registerAction(m_stepOutAction,
cmd = ActionManager::registerAction(m_stepOutAction,
Constants::STEPOUT, cppDebuggercontext);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+T") : tr("Shift+F11")));
cmd->setAttribute(Command::CA_Hide);
debugMenu->addAction(cmd);
cmd = Core::ActionManager::registerAction(m_runToLineAction,
cmd = ActionManager::registerAction(m_runToLineAction,
"Debugger.RunToLine", cppDebuggercontext);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Shift+F8") : tr("Ctrl+F10")));
cmd->setAttribute(Command::CA_Hide);
debugMenu->addAction(cmd);
cmd = Core::ActionManager::registerAction(m_runToSelectedFunctionAction,
cmd = ActionManager::registerAction(m_runToSelectedFunctionAction,
"Debugger.RunToSelectedFunction", cppDebuggercontext);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+F6") : tr("Ctrl+F6")));
cmd->setAttribute(Command::CA_Hide);
......@@ -3278,17 +3278,17 @@ void DebuggerPluginPrivate::extensionsInitialized()
// and text up-to-date is a lot of hassle.
// debugMenu->addAction(cmd);
cmd = Core::ActionManager::registerAction(m_jumpToLineAction,
cmd = ActionManager::registerAction(m_jumpToLineAction,
"Debugger.JumpToLine", cppDebuggercontext);
cmd->setAttribute(Command::CA_Hide);
debugMenu->addAction(cmd);
cmd = Core::ActionManager::registerAction(m_returnFromFunctionAction,
cmd = ActionManager::registerAction(m_returnFromFunctionAction,
"Debugger.ReturnFromFunction", cppDebuggercontext);
cmd->setAttribute(Command::CA_Hide);
debugMenu->addAction(cmd);
cmd = Core::ActionManager::registerAction(m_reverseDirectionAction,
cmd = ActionManager::registerAction(m_reverseDirectionAction,
Constants::REVERSE, cppDebuggercontext);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? QString() : tr("F12")));
cmd->setAttribute(Command::CA_Hide);
......@@ -3296,23 +3296,23 @@ void DebuggerPluginPrivate::extensionsInitialized()
debugMenu->addSeparator(globalcontext);
//cmd = Core::ActionManager::registerAction(m_snapshotAction,
//cmd = ActionManager::registerAction(m_snapshotAction,
// "Debugger.Snapshot", cppDebuggercontext);
//cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+D,Ctrl+S")));
//cmd->setAttribute(Command::CA_Hide);
//debugMenu->addAction(cmd);
cmd = Core::ActionManager::registerAction(m_frameDownAction,
cmd = ActionManager::registerAction(m_frameDownAction,
"Debugger.FrameDown", cppDebuggercontext);
cmd = Core::ActionManager::registerAction(m_frameUpAction,
cmd = ActionManager::registerAction(m_frameUpAction,
"Debugger.FrameUp", cppDebuggercontext);
cmd = Core::ActionManager::registerAction(action(OperateByInstruction),
cmd = ActionManager::registerAction(action(OperateByInstruction),
Constants::OPERATE_BY_INSTRUCTION, cppDebuggercontext);
cmd->setAttribute(Command::CA_Hide);
debugMenu->addAction(cmd);
cmd = Core::ActionManager::registerAction(m_breakAction,
cmd = ActionManager::registerAction(m_breakAction,
"Debugger.ToggleBreak", globalcontext);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("F8") : tr("F9")));
debugMenu->addAction(cmd);
......@@ -3322,7 +3322,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
debugMenu->addSeparator(globalcontext);
// Don't add '1' to the string as it shows up in the shortcut dialog.
cmd = Core::ActionManager::registerAction(m_watchAction1,
cmd = ActionManager::registerAction(m_watchAction1,
"Debugger.AddToWatch", cppeditorcontext);
//cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+D,Ctrl+W")));
debugMenu->addAction(cmd);
......@@ -3330,11 +3330,11 @@ void DebuggerPluginPrivate::extensionsInitialized()
// If the CppEditor plugin is there, we want to add something to
// the editor context menu.
if (ActionContainer *editorContextMenu =
Core::ActionManager::actionContainer(CppEditor::Constants::M_CONTEXT)) {
ActionManager::actionContainer(CppEditor::Constants::M_CONTEXT)) {
cmd = editorContextMenu->addSeparator(cppDebuggercontext);
cmd->setAttribute(Command::CA_Hide);
cmd = Core::ActionManager::registerAction(m_watchAction2,
cmd = ActionManager::registerAction(m_watchAction2,
"Debugger.AddToWatch2", cppDebuggercontext);
cmd->action()->setEnabled(true);
editorContextMenu->addAction(cmd);
......@@ -3570,7 +3570,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
// Menu groups
const Context globalcontext(CC::C_GLOBAL);
ActionContainer *mstart = Core::ActionManager::actionContainer(PE::M_DEBUG_STARTDEBUGGING);
ActionContainer *mstart = ActionManager::actionContainer(PE::M_DEBUG_STARTDEBUGGING);
mstart->appendGroup(Constants::G_START_LOCAL);
mstart->appendGroup(Constants::G_MANUAL_REMOTE);
......
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