From 2d9de933612a63f0b863afc19e124752b62bb559 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 4 Mar 2011 16:21:57 +0100 Subject: Debugger: Add a flexible widget for source path substitutions. Add a new widget to edit the mappings. Rework common options page to use the standard pattern to allow for complex data types, introduce GlobalOptions class. --- src/plugins/debugger/debuggeractions.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/plugins/debugger/debuggeractions.h') diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h index c6c176f296..50ca51a648 100644 --- a/src/plugins/debugger/debuggeractions.h +++ b/src/plugins/debugger/debuggeractions.h @@ -35,6 +35,7 @@ #define DEBUGGER_ACTIONS_H #include +#include QT_BEGIN_NAMESPACE class QSettings; @@ -47,6 +48,22 @@ class SavedAction; namespace Debugger { namespace Internal { +// Global debugger options that are not stored as saved action. +class GlobalDebuggerOptions +{ +public: + typedef QMap SourcePathMap; + + void toSettings(QSettings *) const; + void fromSettings(QSettings *); + bool equals(const GlobalDebuggerOptions &rhs) const { return sourcePathMap == rhs.sourcePathMap; } + + SourcePathMap sourcePathMap; +}; + +inline bool operator==(const GlobalDebuggerOptions &o1, const GlobalDebuggerOptions &o2) { return o1.equals(o2); } +inline bool operator!=(const GlobalDebuggerOptions &o1, const GlobalDebuggerOptions &o2) { return !o1.equals(o2); } + class DebuggerSettings : public QObject { Q_OBJECT // For tr(). @@ -88,7 +105,6 @@ enum DebuggerActionCode UseDebuggingHelpers, UseCustomDebuggingHelperLocation, CustomDebuggingHelperLocation, - QtSourcesLocation, UseCodeModel, ShowThreadNames, -- cgit v1.2.1