forked from qt-creator/qt-creator
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user