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.
This commit is contained in:
Friedemann Kleint
2011-03-04 16:21:57 +01:00
parent b97165329a
commit 2d9de93361
11 changed files with 685 additions and 120 deletions

View File

@@ -35,6 +35,7 @@
#define DEBUGGER_ACTIONS_H
#include <QtCore/QHash>
#include <QtCore/QMap>
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<QString, QString> 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,