Commit b557c58e authored by Lasse Holmstedt's avatar Lasse Holmstedt
Browse files

Qml Debugger: Enable debugging qml+cpp standalone applications

A new debugger engine, QmlCppEngine, is introduced, which wraps gdb
and qml engines into one. Alternatively, if using Windows, Cdb is used
instead of Gdb.

Most of the debugger ui switcher is now rewritten, and it is tailored
for the QML and CPP layout case, the only one supported anyway.

Reviewed-by: hjk
parent ef11c4e7
......@@ -58,6 +58,7 @@ public:
QToolBar *toolbar() const;
static QString idStringForObject(QObject *obj);
QRectF adjustToScreenBoundaries(const QRectF &boundingRectInSceneSpace);
void setDebugMode(bool isDebugMode);
public Q_SLOTS:
void setDesignModeBehavior(bool value);
......
......@@ -37,6 +37,7 @@
#include "boundingrecthighlighter.h"
#include "subcomponenteditortool.h"
#include "qmltoolbar.h"
#include "jsdebuggeragent.h"
#include <QDeclarativeItem>
#include <QDeclarativeEngine>
......@@ -48,6 +49,7 @@
#include <QApplication>
#include <QAbstractAnimation>
#include <private/qdeclarativeengine_p.h>
#include <private/qabstractanimation_p.h>
namespace QmlViewer {
......@@ -61,6 +63,7 @@ QDeclarativeDesignViewPrivate::QDeclarativeDesignViewPrivate(QDeclarativeDesignV
designModeBehavior(false),
executionPaused(false),
slowdownFactor(1.0f),
jsDebuggerAgent(0),
toolbar(0)
{
sceneChangedTimer.setInterval(SceneChangeUpdateInterval);
......@@ -116,6 +119,9 @@ QDeclarativeDesignView::QDeclarativeDesignView(QWidget *parent) :
data->createToolbar();
data->_q_changeToSingleSelectTool();
// always start debug mode - that's what this design view is for.
setDebugMode(true);
}
QDeclarativeDesignView::~QDeclarativeDesignView()
......@@ -763,6 +769,12 @@ void QDeclarativeDesignViewPrivate::createToolbar()
QObject::connect(q, SIGNAL(marqueeSelectToolActivated()), toolbar, SLOT(activateMarqueeSelectTool()));
}
void QDeclarativeDesignView::setDebugMode(bool isDebugMode)
{
if (isDebugMode && !data->jsDebuggerAgent)
data->jsDebuggerAgent = new JSDebuggerAgent(QDeclarativeEnginePrivate::getScriptEngine(engine()));
}
} //namespace QmlViewer
#include <moc_qdeclarativedesignview.cpp>
......@@ -36,6 +36,8 @@
#include "qdeclarativedesignview.h"
QT_FORWARD_DECLARE_CLASS(JSDebuggerAgent)
namespace QmlViewer {
class QDeclarativeDesignView;
......@@ -82,6 +84,8 @@ public:
bool executionPaused;
qreal slowdownFactor;
JSDebuggerAgent *jsDebuggerAgent;
QmlToolbar *toolbar;
QTimer sceneChangedTimer;
QSet<QGraphicsObject *> sceneGraphicsObjects;
......
......@@ -38,19 +38,19 @@ namespace Constants {
// modes and their priorities
const char * const MODE_DEBUG = "Debugger.Mode.Debug";
const int P_MODE_DEBUG = 85;
const char * const LANG_CPP = "C++";
// common actions
const char * const STOP = "Debugger.Interrupt";
const char * const STOP = "Debugger.Interrupt";
const char * const RESET = "Debugger.Reset";
const char * const STEP = "Debugger.StepLine";
const char * const STEPOUT = "Debugger.StepOut";
const char * const NEXT = "Debugger.NextLine";
const char * const REVERSE = "Debugger.ReverseDirection";
const char * const M_DEBUG_LANGUAGES = "Debugger.Menu.View.Languages";
const char * const M_DEBUG_VIEWS = "Debugger.Menu.View.Debug";
const char * const M_DEBUG_DEBUGGING_LANGUAGES = "Debugger.Menu.View.DebugLanguages";
const char * const M_DEBUG_VIEWS = "Debugger.Menu.View.Debug";
const char * const C_DEBUGMODE = "Debugger.DebugMode";
const char * const C_DEBUGMODE = "Debugger.DebugMode";
const char * const C_CPPDEBUGGER = "Gdb Debugger";
const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common";
......@@ -62,6 +62,22 @@ const char * const DEBUGGER_SETTINGS_TR_CATEGORY =
const char * const DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON =
":/core/images/category_debug.png";
const int QML_DEFAULT_DEBUG_SERVER_PORT = 3768;
const char * const E_QML_DEBUG_SERVER_PORT = "QML_DEBUG_SERVER_PORT";
// dock widget names
const char * const DW_BREAK = "Debugger.Docks.Break";
const char * const DW_MODULES = "Debugger.Docks.Modules";
const char * const DW_REGISTER = "Debugger.Docks.Register";
const char * const DW_OUTPUT = "Debugger.Docks.Output";
const char * const DW_SNAPSHOTS = "Debugger.Docks.Snapshots";
const char * const DW_STACK = "Debugger.Docks.Stack";
const char * const DW_SOURCE_FILES = "Debugger.Docks.SourceFiles";
const char * const DW_THREADS = "Debugger.Docks.Threads";
const char * const DW_WATCHERS = "Debugger.Docks.LocalsAndWatchers";
const char * const DW_QML_INSPECTOR = "Debugger.Docks.QmlInspector";
namespace Internal {
enum { debug = 0 };
#ifdef Q_OS_MAC
......@@ -71,6 +87,7 @@ namespace Internal {
#endif
} // namespace Internal
} // namespace Constants
......@@ -267,13 +284,23 @@ enum DebuggerEngineType
PdbEngineType = 0x08,
TcfEngineType = 0x10,
QmlEngineType = 0x20,
QmlCppEngineType = 0x40,
AllEngineTypes = GdbEngineType
| ScriptEngineType
| CdbEngineType
| PdbEngineType
| TcfEngineType
| QmlEngineType
| QmlCppEngineType
};
enum DebuggerLanguage
{
Lang_None = 0x0,
Lang_Cpp = 0x1,
Lang_Qml = 0x2
};
Q_DECLARE_FLAGS(DebuggerLanguages, DebuggerLanguage)
} // namespace Debugger
......
......@@ -106,12 +106,14 @@ using namespace TextEditor;
///////////////////////////////////////////////////////////////////////
DebuggerStartParameters::DebuggerStartParameters()
: attachPID(-1),
useTerminal(false),
breakAtMain(false),
toolChainType(ToolChain::UNKNOWN),
startMode(NoStartMode),
executableUid(0)
: attachPID(-1)
, useTerminal(false)
, breakAtMain(false)
, qmlServerAddress("127.0.0.1")
, qmlServerPort(0)
, toolChainType(ToolChain::UNKNOWN)
, executableUid(0)
, startMode(NoStartMode)
{}
void DebuggerStartParameters::clear()
......@@ -233,7 +235,8 @@ public:
m_stackHandler(engine),
m_threadsHandler(engine),
m_watchHandler(engine),
m_disassemblerViewAgent(engine)
m_disassemblerViewAgent(engine),
m_runInWrapperEngine(false)
{}
~DebuggerEnginePrivate() {}
......@@ -312,6 +315,8 @@ public:
WatchHandler m_watchHandler;
DisassemblerViewAgent m_disassemblerViewAgent;
QFutureInterface<void> m_progress;
bool m_runInWrapperEngine;
};
void DebuggerEnginePrivate::breakpointSetRemoveMarginActionTriggered()
......@@ -1329,7 +1334,11 @@ void DebuggerEngine::notifyEngineShutdownOk()
showMessage(_("NOTE: ENGINE SHUTDOWN OK"));
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << state());
setState(EngineShutdownOk);
d->queueFinishDebugger();
if (!d->m_runInWrapperEngine) {
d->queueFinishDebugger();
} else {
setState(DebuggerFinished);
}
}
void DebuggerEngine::notifyEngineShutdownFailed()
......@@ -1337,7 +1346,11 @@ void DebuggerEngine::notifyEngineShutdownFailed()
showMessage(_("NOTE: ENGINE SHUTDOWN FAILED"));
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << state());
setState(EngineShutdownFailed);
d->queueFinishDebugger();
if (!d->m_runInWrapperEngine) {
d->queueFinishDebugger();
} else {
setState(DebuggerFinished);
}
}
void DebuggerEnginePrivate::doFinishDebugger()
......@@ -1395,7 +1408,7 @@ void DebuggerEngine::notifyInferiorExited()
void DebuggerEngine::setState(DebuggerState state, bool forced)
{
//qDebug() << "STATUS CHANGE: FROM " << stateName(d->m_state)
// << " TO " << stateName(state);
// << " TO " << stateName(state);
DebuggerState oldState = d->m_state;
d->m_state = state;
......@@ -1412,6 +1425,13 @@ void DebuggerEngine::setState(DebuggerState state, bool forced)
showMessage(msg, LogDebug);
plugin()->updateState(this);
emit stateChanged(d->m_state);
}
void DebuggerEngine::setRunInWrapperEngine(bool value)
{
d->m_runInWrapperEngine = value;
}
bool DebuggerEngine::debuggerActionsEnabled() const
......@@ -1528,6 +1548,11 @@ QMessageBox *DebuggerEngine::showMessageBox(int icon, const QString &title,
return plugin()->showMessageBox(icon, title, text, buttons);
}
DebuggerRunControl *DebuggerEngine::runControl() const
{
return d->m_runControl;
}
} // namespace Internal
} // namespace Debugger
......
......@@ -79,6 +79,7 @@ public:
// for qml debugging
QString qmlServerAddress;
quint16 qmlServerPort;
DebuggerEngineType cppEngineType; // for cpp+qml debugging
// for remote debugging
QString remoteChannel;
......@@ -218,17 +219,17 @@ public:
WatchHandler *watchHandler() const;
SourceFilesHandler *sourceFilesHandler() const;
QAbstractItemModel *commandModel() const;
QAbstractItemModel *modulesModel() const;
QAbstractItemModel *breakModel() const;
QAbstractItemModel *registerModel() const;
QAbstractItemModel *stackModel() const;
QAbstractItemModel *threadsModel() const;
QAbstractItemModel *localsModel() const;
QAbstractItemModel *watchersModel() const;
QAbstractItemModel *returnModel() const;
virtual QAbstractItemModel *commandModel() const;
virtual QAbstractItemModel *modulesModel() const;
virtual QAbstractItemModel *breakModel() const;
virtual QAbstractItemModel *registerModel() const;
virtual QAbstractItemModel *stackModel() const;
virtual QAbstractItemModel *threadsModel() const;
virtual QAbstractItemModel *localsModel() const;
virtual QAbstractItemModel *watchersModel() const;
virtual QAbstractItemModel *returnModel() const;
//QAbstractItemModel *snapshotModel() const;
QAbstractItemModel *sourceFilesModel() const;
virtual QAbstractItemModel *sourceFilesModel() const;
void progressPing();
void handleFinished();
......@@ -275,6 +276,9 @@ public:
void gotoLocation(const StackFrame &frame, bool setMarker);
virtual void quitDebugger(); // called by DebuggerRunControl
signals:
void stateChanged(const DebuggerState &state);
protected:
// The base notify*() function implementation should be sufficient
// in most cases, but engines are free to override them to do some
......@@ -318,8 +322,11 @@ protected:
virtual void shutdownInferior() = 0;
virtual void shutdownEngine() = 0;
private:
void setState(DebuggerState state, bool forced = false);
void setRunInWrapperEngine(bool value);
private:
DebuggerRunControl *runControl() const;
private:
void executeRunToLine();
......@@ -327,6 +334,9 @@ private:
void executeJumpToLine();
void addToWatchWindow();
// wrapper engine needs access to state of its subengines
friend class QmlCppEngine;
friend class DebuggerEnginePrivate;
DebuggerEnginePrivate *d;
};
......
......@@ -71,9 +71,7 @@ QMenu* DebuggerMainWindow::createPopupMenu()
for (int i = 0; i < dockwidgets.size(); ++i) {
QDockWidget *dockWidget = dockwidgets.at(i)->m_dockWidget;
if (dockWidget->parentWidget() == this &&
dockwidgets.at(i)->m_languageId == m_uiSwitcher->activeLanguageId()) {
if (dockWidget->parentWidget() == this) {
menu->addAction(dockWidget->toggleViewAction());
}
}
......
......@@ -31,6 +31,7 @@
#define DEBUGGERMAINWINDOW_H
#include <utils/fancymainwindow.h>
#include "debuggerconstants.h"
QT_FORWARD_DECLARE_CLASS(QMenu);
......@@ -42,10 +43,9 @@ namespace Internal {
class DebugToolWindow
{
public:
DebugToolWindow() : m_dockWidget(0), m_languageId(-1), m_visible(false) {}
DebugToolWindow() : m_dockWidget(0), m_visible(false) {}
QDockWidget *m_dockWidget;
int m_languageId;
bool m_visible;
};
......
......@@ -75,6 +75,7 @@
#include <coreplugin/findplaceholder.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <coreplugin/imode.h>
#include <coreplugin/icorelistener.h>
#include <coreplugin/manhattanstyle.h>
#include <coreplugin/messagemanager.h>
......@@ -791,18 +792,6 @@ static TextEditor::ITextEditor *currentTextEditor()
return qobject_cast<ITextEditor*>(editor);
}
static bool isCurrentProjectCppBased()
{
Project *startupProject = ProjectExplorerPlugin::instance()->startupProject();
if (!startupProject)
return false;
const QString id = startupProject->id();
return id == _("GenericProjectManager.GenericProject")
|| id == _("CMakeProjectManager.CMakeProject")
|| id == _("Qt4ProjectManager.Qt4Project");
}
///////////////////////////////////////////////////////////////////////
//
// DebuggerPluginPrivate
......@@ -868,7 +857,7 @@ public slots:
{ if (on) notifyCurrentEngine(RequestReloadRegistersRole); }
void onAction();
void setSimpleDockWidgetArrangement(const QString &activeLanguage);
void setSimpleDockWidgetArrangement(const Debugger::DebuggerLanguages &activeLanguages);
void editorOpened(Core::IEditor *editor);
void editorAboutToClose(Core::IEditor *editor);
......@@ -900,7 +889,7 @@ public slots:
void exitDebugger();
void enableReverseDebuggingTriggered(const QVariant &value);
void languageChanged(const QString &debuggerLanguage);
void languagesChanged(const Debugger::DebuggerLanguages &languages);
void showStatusMessage(const QString &msg, int timeout = -1);
DebuggerMainWindow *mainWindow()
......@@ -915,7 +904,7 @@ public slots:
DebuggerRunControl *createDebugger(const DebuggerStartParameters &sp,
ProjectExplorer::RunConfiguration *rc = 0);
void startDebugger(ProjectExplorer::RunControl *runControl);
void displayDebugger(ProjectExplorer::RunControl *runControl);
void displayDebugger(DebuggerEngine *engine, bool updateEngine = true);
void dumpLog();
void cleanupViews();
......@@ -1234,36 +1223,40 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
m_uiSwitcher = new DebuggerUISwitcher(m_debugMode, this);
ExtensionSystem::PluginManager::instance()->addObject(m_uiSwitcher);
theDebuggerAction(SwitchLanguageAutomatically)->setChecked(true);
m_uiSwitcher->addLanguage(LANG_CPP, cppDebuggercontext);
m_uiSwitcher->setActiveLanguage(LANG_CPP);
m_uiSwitcher->addLanguage(Lang_Cpp, tr("C++"), cppDebuggercontext);
// Dock widgets
m_breakDock = m_uiSwitcher->createDockWidget(LANG_CPP, m_breakWindow);
m_modulesDock = m_uiSwitcher->createDockWidget(LANG_CPP, m_modulesWindow,
m_breakDock = m_uiSwitcher->createDockWidget(Lang_Cpp, m_breakWindow);
m_breakDock->setObjectName(QString(DW_BREAK));
m_modulesDock = m_uiSwitcher->createDockWidget(Lang_Cpp, m_modulesWindow,
Qt::TopDockWidgetArea, false);
m_modulesDock->setObjectName(QString(DW_MODULES));
connect(m_modulesDock->toggleViewAction(), SIGNAL(toggled(bool)),
SLOT(modulesDockToggled(bool)), Qt::QueuedConnection);
m_registerDock = m_uiSwitcher->createDockWidget(LANG_CPP, m_registerWindow,
m_registerDock = m_uiSwitcher->createDockWidget(Lang_Cpp, m_registerWindow,
Qt::TopDockWidgetArea, false);
m_registerDock->setObjectName(QString(DW_REGISTER));
connect(m_registerDock->toggleViewAction(), SIGNAL(toggled(bool)),
SLOT(registerDockToggled(bool)), Qt::QueuedConnection);
m_outputDock = m_uiSwitcher->createDockWidget(QString(), m_outputWindow,
m_outputDock = m_uiSwitcher->createDockWidget(Lang_None, m_outputWindow,
Qt::TopDockWidgetArea, false);
m_outputDock->setObjectName(QString(DW_OUTPUT));
m_snapshotDock = m_uiSwitcher->createDockWidget(Lang_Cpp, m_snapshotWindow);
m_snapshotDock->setObjectName(QString(DW_SNAPSHOTS));
m_snapshotDock = m_uiSwitcher->createDockWidget(LANG_CPP, m_snapshotWindow);
m_stackDock = m_uiSwitcher->createDockWidget(LANG_CPP, m_stackWindow);
m_stackDock = m_uiSwitcher->createDockWidget(Lang_Cpp, m_stackWindow);
m_stackDock->setObjectName(QString(DW_STACK));
m_sourceFilesDock = m_uiSwitcher->createDockWidget(LANG_CPP,
m_sourceFilesDock = m_uiSwitcher->createDockWidget(Lang_Cpp,
m_sourceFilesWindow, Qt::TopDockWidgetArea, false);
m_sourceFilesDock->setObjectName(QString(DW_SOURCE_FILES));
connect(m_sourceFilesDock->toggleViewAction(), SIGNAL(toggled(bool)),
SLOT(sourceFilesDockToggled(bool)), Qt::QueuedConnection);
m_threadsDock = m_uiSwitcher->createDockWidget(LANG_CPP, m_threadsWindow);
m_threadsDock = m_uiSwitcher->createDockWidget(Lang_Cpp, m_threadsWindow);
m_threadsDock->setObjectName(QString(DW_THREADS));
QSplitter *localsAndWatchers = new Core::MiniSplitter(Qt::Vertical);
localsAndWatchers->setObjectName(QLatin1String("CppDebugLocalsAndWatchers"));
......@@ -1275,10 +1268,12 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
localsAndWatchers->setStretchFactor(1, 1);
localsAndWatchers->setStretchFactor(2, 1);
m_watchDock = m_uiSwitcher->createDockWidget(LANG_CPP, localsAndWatchers);
m_watchDock = m_uiSwitcher->createDockWidget(Lang_Cpp, localsAndWatchers);
m_watchDock->setObjectName(QString(DW_WATCHERS));
m_dockWidgets << m_breakDock << m_modulesDock << m_registerDock
<< m_outputDock << m_stackDock << m_sourceFilesDock
<< m_threadsDock << m_watchDock;
<< m_outputDock << m_snapshotDock << m_stackDock
<< m_sourceFilesDock << m_threadsDock << m_watchDock;
// Do not fail the whole plugin if something goes wrong here.
uint cmdLineEnabledEngines = AllEngineTypes;
......@@ -1369,7 +1364,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
cmd = am->registerAction(m_detachAction,
Constants::DETACH, globalcontext);
cmd->setAttribute(Command::CA_Hide);
m_uiSwitcher->addMenuAction(cmd, CC::G_DEFAULT_ONE);
m_uiSwitcher->addMenuAction(cmd, Lang_None, CC::G_DEFAULT_ONE);
cmd = am->registerAction(m_actions.stopAction,
Constants::STOP, globalcontext);
......@@ -1377,7 +1372,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
cmd->setAttribute(Command::CA_UpdateIcon);
//cmd->setDefaultKeySequence(QKeySequence(Constants::STOP_KEY));
cmd->setDefaultText(tr("Stop Debugger"));
m_uiSwitcher->addMenuAction(cmd, CC::G_DEFAULT_ONE);
m_uiSwitcher->addMenuAction(cmd, Lang_None, CC::G_DEFAULT_ONE);
cmd = am->registerAction(m_actions.interruptAction,
PE::DEBUG, m_interruptibleContext);
......@@ -1391,77 +1386,77 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
cmd->setAttribute(Core::Command::CA_UpdateText);
//cmd->setDefaultKeySequence(QKeySequence(Constants::RESET_KEY));
cmd->setDefaultText(tr("Reset Debugger"));
m_uiSwitcher->addMenuAction(cmd, CC::G_DEFAULT_ONE);
m_uiSwitcher->addMenuAction(cmd, Lang_None, CC::G_DEFAULT_ONE);
QAction *sep = new QAction(this);
sep->setSeparator(true);
cmd = am->registerAction(sep, _("Debugger.Sep.Step"), globalcontext);
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
cmd = am->registerAction(m_actions.nextAction,
Constants::NEXT, cppDebuggercontext);
cmd->setDefaultKeySequence(QKeySequence(Constants::NEXT_KEY));
cmd->setAttribute(Command::CA_Hide);
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
cmd = am->registerAction(m_actions.stepAction,
Constants::STEP, cppDebuggercontext);
cmd->setDefaultKeySequence(QKeySequence(Constants::STEP_KEY));
cmd->setAttribute(Command::CA_Hide);
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
cmd = am->registerAction(m_actions.stepOutAction,
Constants::STEPOUT, cppDebuggercontext);
cmd->setDefaultKeySequence(QKeySequence(Constants::STEPOUT_KEY));
cmd->setAttribute(Command::CA_Hide);
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
cmd = am->registerAction(m_actions.runToLineAction1,
Constants::RUN_TO_LINE1, cppDebuggercontext);
cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_LINE_KEY));
cmd->setAttribute(Command::CA_Hide);
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
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_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
cmd = am->registerAction(m_actions.jumpToLineAction1,
Constants::JUMP_TO_LINE1, cppDebuggercontext);
cmd->setAttribute(Command::CA_Hide);
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
cmd = am->registerAction(m_actions.returnFromFunctionAction,
Constants::RETURN_FROM_FUNCTION, cppDebuggercontext);
cmd->setAttribute(Command::CA_Hide);
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
cmd = am->registerAction(m_actions.reverseDirectionAction,
Constants::REVERSE, cppDebuggercontext);
cmd->setDefaultKeySequence(QKeySequence(Constants::REVERSE_KEY));
cmd->setAttribute(Command::CA_Hide);
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
sep = new QAction(this);
sep->setSeparator(true);
cmd = am->registerAction(sep, _("Debugger.Sep.Break"), globalcontext);
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
cmd = am->registerAction(m_actions.snapshotAction,
Constants::SNAPSHOT, cppDebuggercontext);
cmd->setDefaultKeySequence(QKeySequence(Constants::SNAPSHOT_KEY));
cmd->setAttribute(Command::CA_Hide);
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
cmd = am->registerAction(m_actions.frameDownAction,
Constants::FRAME_DOWN, cppDebuggercontext);
......@@ -1472,13 +1467,13 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
cmd = am->registerAction(theDebuggerAction(OperateByInstruction),
Constants::OPERATE_BY_INSTRUCTION, cppDebuggercontext);
cmd->setAttribute(Command::CA_Hide);
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
cmd = am->registerAction(m_actions.breakAction,
Constants::TOGGLE_BREAK, globalcontext);
cmd->setDefaultKeySequence(QKeySequence(Constants::TOGGLE_BREAK_KEY));
m_uiSwitcher->addMenuAction(cmd, Constants::LANG_CPP);
m_uiSwitcher->addMenuAction(cmd, Lang_Cpp);
connect(m_actions.breakAction, SIGNAL(triggered()),
this, SLOT(toggleBreakpoint()));
......@@ -1487,14 +1482,14 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
sep = new QAction(this);
sep->setSeparator(true);
cmd = am-><