From 6a6cba5518fb88345c53a7cd645f6cb6466a84e3 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 16 Jun 2010 11:08:54 +0200 Subject: debugger: The DebuggerEngine refactoring. This replaces the (de facto) singleton engines and data handlers by classes that are instantiated per run. The DebuggerRunControl will now create an object of (a class derived from) DebuggerEngine that contains all the relevant "dynamic" data. DebuggerManager is no more. The "singleton" bits are merged into DebuggerPlugin, whereas the data bits went to DebuggerEngine. There is no formal notion of a "current" DebuggerEngine. However, as there's only one DebuggerEngine at a time that has its data models connected to the view, there's still some "de facto" notion of a "current" engine. Calling SomeModel::setData(int role, QVariant data) with custom role is used as the primary dispatch mechanism from the views to the "current" data models (and the engine, as all data models know their engine). --- src/plugins/debugger/debuggeractions.h | 38 ++++++---------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) (limited to 'src/plugins/debugger/debuggeractions.h') diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h index e0040eb09c..86c11ac93e 100644 --- a/src/plugins/debugger/debuggeractions.h +++ b/src/plugins/debugger/debuggeractions.h @@ -32,7 +32,6 @@ #include #include -#include QT_BEGIN_NAMESPACE class QAction; @@ -41,7 +40,7 @@ class QSettings; QT_END_NAMESPACE namespace Utils { - class SavedAction; +class SavedAction; } namespace Debugger { @@ -52,12 +51,14 @@ class DebuggerSettings : public QObject Q_OBJECT public: typedef QMultiMap GdbBinaryToolChainMap; - typedef QSharedPointer GdbBinaryToolChainMapPtr; explicit DebuggerSettings(QObject *parent = 0); ~DebuggerSettings(); - GdbBinaryToolChainMapPtr gdbBinaryToolChainMap() const { return m_gdbBinaryToolChainMap; } + GdbBinaryToolChainMap gdbBinaryToolChainMap() const + { return m_gdbBinaryToolChainMap; } + void setGdbBinaryToolChainMap(const GdbBinaryToolChainMap &map) + { m_gdbBinaryToolChainMap = map; } void insertItem(int code, Utils::SavedAction *item); Utils::SavedAction *item(int code) const; @@ -72,8 +73,7 @@ public slots: private: QHash m_items; - - const GdbBinaryToolChainMapPtr m_gdbBinaryToolChainMap; + GdbBinaryToolChainMap m_gdbBinaryToolChainMap; }; @@ -127,8 +127,6 @@ enum DebuggerActionCode WatchExpressionInWindow, RemoveWatchExpression, WatchPoint, - AssignValue, - AssignType, ShowStdNamespace, ShowQtNamespace, @@ -160,30 +158,6 @@ Utils::SavedAction *theDebuggerAction(int code); bool theDebuggerBoolSetting(int code); QString theDebuggerStringSetting(int code); -struct DebuggerManagerActions -{ - QAction *continueAction; - QAction *stopAction; - QAction *resetAction; // FIXME: Should not be needed in a stable release - QAction *stepAction; - QAction *stepOutAction; - QAction *runToLineAction1; // in the Debug menu - QAction *runToLineAction2; // in the text editor context menu - QAction *runToFunctionAction; - QAction *jumpToLineAction1; // in the Debug menu - QAction *jumpToLineAction2; // in the text editor context menu - QAction *returnFromFunctionAction; - QAction *nextAction; - QAction *snapshotAction; - QAction *watchAction1; // in the Debug menu - QAction *watchAction2; // in the text editor context menu - QAction *breakAction; - QAction *sepAction; - QAction *reverseDirectionAction; - QAction *frameUpAction; - QAction *frameDownAction; -}; - } // namespace Internal } // namespace Debugger -- cgit v1.2.1