Files
qt-creator/src/plugins/debugger/debuggeractions.h

186 lines
4.5 KiB
C
Raw Normal View History

/****************************************************************************
2009-03-18 10:04:02 +01:00
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
2009-03-18 10:04:02 +01:00
**
** This file is part of Qt Creator.
2009-03-18 10:04:02 +01:00
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
2009-03-18 10:04:02 +01:00
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
2010-12-17 16:01:08 +01:00
**
****************************************************************************/
2009-03-18 10:04:02 +01:00
#ifndef DEBUGGER_ACTIONS_H
#define DEBUGGER_ACTIONS_H
#include <QObject>
#include <QHash>
#include <QMap>
#include <QRegExp>
#include <QVector>
namespace Utils { class SavedAction; }
namespace Debugger {
namespace Internal {
typedef QMap<QString, QString> SourcePathMap;
typedef QVector<QPair<QRegExp, QString> > SourcePathRegExpMap;
// Global debugger options that are not stored as saved action.
class GlobalDebuggerOptions
{
public:
void toSettings() const;
void fromSettings();
bool operator==(const GlobalDebuggerOptions &rhs) const
{
return sourcePathMap == rhs.sourcePathMap
&& sourcePathRegExpMap == rhs.sourcePathRegExpMap;
}
bool operator!=(const GlobalDebuggerOptions &rhs) const
{
return !(*this == rhs);
}
SourcePathMap sourcePathMap;
SourcePathRegExpMap sourcePathRegExpMap;
};
2009-03-19 15:44:26 +01:00
class DebuggerSettings : public QObject
{
Q_OBJECT // For tr().
public:
explicit DebuggerSettings();
2009-03-19 15:44:26 +01:00
~DebuggerSettings();
void insertItem(int code, Utils::SavedAction *item);
Utils::SavedAction *item(int code) const;
QString dump() const;
void readSettings();
void writeSettings() const;
private:
QHash<int, Utils::SavedAction *> m_items;
};
///////////////////////////////////////////////////////////
2009-03-19 15:44:26 +01:00
enum DebuggerActionCode
2009-03-18 10:04:02 +01:00
{
// General
SettingsDialog,
UseAlternatingRowColors,
FontSizeFollowsEditor,
UseMessageBoxForSignals,
2009-03-24 15:01:35 +01:00
AutoQuit,
2009-03-18 10:04:02 +01:00
LockView,
LogTimeStamps,
OperateByInstruction,
CloseSourceBuffersOnExit,
CloseMemoryBuffersOnExit,
SwitchModeOnExit,
BreakpointsFullPathByDefault,
RaiseOnInterrupt,
StationaryEditorWhileStepping,
2009-03-18 10:04:02 +01:00
UseDebuggingHelpers,
UseCodeModel,
ShowThreadNames,
UseToolTipsInMainEditor,
UseToolTipsInLocalsView,
UseToolTipsInBreakpointsView,
UseToolTipsInStackView,
UseAddressInBreakpointsView,
UseAddressInStackView,
RegisterForPostMortem,
AlwaysAdjustColumnWidths,
ExtraDumperFile, // For loading a file. Recommended.
ExtraDumperCommands, // To modify an existing setup.
// Cdb
CdbAdditionalArguments,
CdbSymbolPaths,
CdbSourcePaths,
CdbBreakEvents,
CdbBreakOnCrtDbgReport,
UseCdbConsole,
CdbBreakPointCorrection,
IgnoreFirstChanceAccessViolation,
2009-03-18 10:04:02 +01:00
// Gdb
LoadGdbInit,
LoadGdbDumpers,
AttemptQuickStart,
GdbStartupCommands,
GdbPostAttachCommands,
GdbWatchdogTimeout,
AutoEnrichParameters,
UseDynamicType,
TargetAsync,
WarnOnReleaseBuilds,
MultiInferior,
IntelFlavor,
IdentifyDebugInfoPackages,
2009-03-18 10:04:02 +01:00
// Stack
MaximalStackDepth,
ExpandStack,
CreateFullBacktrace,
2009-03-18 10:04:02 +01:00
// Watchers & Locals
ShowStdNamespace,
ShowQtNamespace,
ShowQObjectNames,
SortStructMembers,
AutoDerefPointers,
MaximalStringLength,
DisplayStringLimit,
2009-03-23 12:28:02 +01:00
2009-03-18 10:04:02 +01:00
// Running
SkipKnownFrames,
EnableReverseDebugging,
2009-03-18 10:04:02 +01:00
// Breakpoints
SynchronizeBreakpoints,
AllPluginBreakpoints,
SelectedPluginBreakpoints,
AdjustBreakpointLocations,
2009-03-18 10:04:02 +01:00
NoPluginBreakpoints,
SelectedPluginBreakpointsPattern,
BreakOnThrow,
BreakOnCatch,
BreakOnWarning,
BreakOnFatal,
BreakOnAbort,
// QML Tools
ShowQmlObjectTree,
ShowAppOnTop
};
2009-03-18 10:04:02 +01:00
} // namespace Internal
} // namespace Debugger
#endif // DEBUGGER_WATCHWINDOW_H