diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 8b048f5ea93da82f8fdc35fb3db360cb49d99c3b..eeae5575d5b92c4de8f0bfbff7deb7e82307224b 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -31,6 +31,7 @@ **************************************************************************/ #include "breakhandler.h" +#include "debuggerinternalconstants.h" #include "breakpointmarker.h" #include "debuggeractions.h" diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp index b338f8bc91bfcba9bbb4887c1fe8e6f47bea8dbc..39f1fd29d6fe2f9a094c22116d387f2a03138205 100644 --- a/src/plugins/debugger/breakwindow.cpp +++ b/src/plugins/debugger/breakwindow.cpp @@ -31,6 +31,7 @@ **************************************************************************/ #include "breakwindow.h" +#include "debuggerinternalconstants.h" #include "breakhandler.h" #include "debuggerengine.h" #include "debuggeractions.h" diff --git a/src/plugins/debugger/cdb/cdboptionspage.cpp b/src/plugins/debugger/cdb/cdboptionspage.cpp index 46bfaf1e096e427a291d8950d06cbc9ccc1afed7..ccc75896c5b786b230bb2ca634dfc300324306f5 100644 --- a/src/plugins/debugger/cdb/cdboptionspage.cpp +++ b/src/plugins/debugger/cdb/cdboptionspage.cpp @@ -32,7 +32,7 @@ #include "cdboptionspage.h" #include "cdboptions.h" -#include "debuggerconstants.h" +#include "debuggerinternalconstants.h" #include "cdbengine.h" #include <utils/synchronousprocess.h> diff --git a/src/plugins/debugger/commonoptionspage.cpp b/src/plugins/debugger/commonoptionspage.cpp index 8a2591003d5b6de684ffa8fbf370080e1a6e9f75..829b9608540b8a4e1bf9376249f0239fee57de5b 100644 --- a/src/plugins/debugger/commonoptionspage.cpp +++ b/src/plugins/debugger/commonoptionspage.cpp @@ -33,7 +33,7 @@ #include "commonoptionspage.h" #include "debuggeractions.h" -#include "debuggerconstants.h" +#include "debuggerinternalconstants.h" #include "debuggercore.h" #include "debuggerstringutils.h" diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro index 8f7e909c3185f9d8f3b953e60072ef91c85826eb..57e9586df8801d12b2de09064eb257c20d2b4385 100644 --- a/src/plugins/debugger/debugger.pro +++ b/src/plugins/debugger/debugger.pro @@ -26,6 +26,7 @@ HEADERS += breakhandler.h \ debuggeractions.h \ debuggercore.h \ debuggerconstants.h \ + debuggerinternalconstants.h \ debuggerdialogs.h \ debuggerengine.h \ debuggermainwindow.h \ diff --git a/src/plugins/debugger/debuggerconstants.h b/src/plugins/debugger/debuggerconstants.h index 311e27a3260f3db9984da7d32d7d88592bd10de3..085f65e50908dd645f3ae7c01e75d5a9d26a5ae1 100644 --- a/src/plugins/debugger/debuggerconstants.h +++ b/src/plugins/debugger/debuggerconstants.h @@ -33,16 +33,23 @@ #ifndef DEBUGGERCONSTANTS_H #define DEBUGGERCONSTANTS_H -#include <QtCore/QtGlobal> +#include <QtCore/QFlags> namespace Debugger { namespace Constants { -// modes and their priorities +// Debug mode const char * const MODE_DEBUG = "Debugger.Mode.Debug"; -const int P_MODE_DEBUG = 85; -// common actions +// Contexts +const char * const C_DEBUGMODE = "Debugger.DebugMode"; +const char * const C_CPPDEBUGGER = "Gdb Debugger"; +const char * const C_QMLDEBUGGER = "Qml/JavaScript Debugger"; + +// Project Explorer run mode (RUN/DEBUG) +const char * const DEBUGMODE = "Debugger.DebugMode"; + +// Common actions (accessed by QML inspector) const char * const INTERRUPT = "Debugger.Interrupt"; const char * const CONTINUE = "Debugger.Continue"; const char * const STOP = "Debugger.Stop"; @@ -53,20 +60,7 @@ const char * const NEXT = "Debugger.NextLine"; const char * const REVERSE = "Debugger.ReverseDirection"; const char * const OPERATE_BY_INSTRUCTION = "Debugger.OperateByInstruction"; -const char * const C_DEBUGMODE = "Debugger.DebugMode"; -const char * const C_CPPDEBUGGER = "Gdb Debugger"; -const char * const C_QMLDEBUGGER = "Qml/JavaScript Debugger"; - -const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common"; -const char * const DEBUGGER_COMMON_SETTINGS_NAME = - QT_TRANSLATE_NOOP("Debugger", "General"); -const char * const DEBUGGER_SETTINGS_CATEGORY = "O.Debugger"; -const char * const DEBUGGER_SETTINGS_TR_CATEGORY = - QT_TRANSLATE_NOOP("Debugger", "Debugger"); -const char * const DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON = - ":/core/images/category_debug.png"; - -// dock widget names +// DebuggerMainWindow dock widget names const char * const DOCKWIDGET_BREAK = "Debugger.Docks.Break"; const char * const DOCKWIDGET_MODULES = "Debugger.Docks.Modules"; const char * const DOCKWIDGET_REGISTER = "Debugger.Docks.Register"; @@ -81,26 +75,8 @@ const char * const DOCKWIDGET_QML_INSPECTOR = "Debugger.Docks.QmlInspector"; const char * const DOCKWIDGET_QML_SCRIPTCONSOLE = "Debugger.Docks.ScriptConsole"; const char * const DOCKWIDGET_DEFAULT_AREA = "Debugger.Docks.DefaultArea"; -namespace Internal { - enum { debug = 0 }; -} // namespace Internal - -const char * const OPENED_BY_DEBUGGER = "OpenedByDebugger"; -const char * const OPENED_WITH_DISASSEMBLY = "DisassemblerView"; -const char * const OPENED_WITH_MEMORY = "MemoryView"; - -const char * const DEBUGMODE = "Debugger.DebugMode"; -const char * const DEBUG = "Debugger.Debug"; -const int P_ACTION_DEBUG = 90; //priority for the modemanager -#ifdef Q_OS_MAC -const char * const DEBUG_KEY = "Ctrl+Y"; -#else -const char * const DEBUG_KEY = "F5"; -#endif - } // namespace Constants - enum DebuggerState { DebuggerNotReady, // Debugger not started @@ -194,40 +170,6 @@ enum LogChannel ScriptConsoleOutput }; -enum ModelRoles -{ - DisplaySourceRole = 32, // Qt::UserRole - - EngineStateRole, - EngineCapabilitiesRole, - EngineActionsEnabledRole, - RequestActivationRole, - RequestContextMenuRole, - - // Locals and Watchers - LocalsINameRole, - LocalsEditTypeRole, // A QVariant::type describing the item - LocalsIntegerBaseRole, // Number base 16, 10, 8, 2 - LocalsExpressionRole, - LocalsRawExpressionRole, - LocalsExpandedRole, // The preferred expanded state to the view - LocalsRawTypeRole, // Raw type name - LocalsTypeRole, // Display type name - LocalsTypeFormatListRole, - LocalsTypeFormatRole, // Used to communicate alternative formats to the view - LocalsIndividualFormatRole, - LocalsAddressRole, // Memory address of variable as quint64 - LocalsReferencingAddressRole, // Address referencing for 'Automatically dereferenced pointer' - LocalsSizeRole, // Size of variable as quint - LocalsRawValueRole, // Unformatted value as string - LocalsPointerValueRole, // Pointer value (address) as quint64 - LocalsIsWatchpointAtAddressRole, - LocalsIsWatchpointAtPointerValueRole, - - // Snapshots - SnapshotCapabilityRole -}; - enum DebuggerEngineType { NoEngineType = 0, @@ -258,4 +200,3 @@ Q_DECLARE_FLAGS(DebuggerLanguages, DebuggerLanguage) } // namespace Debugger #endif // DEBUGGERCONSTANTS_H - diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 9f49e082de76d630bf5bde6886f2bfb8797e015b..bccd97939a7bdf1c6e95f4fa3cd950b4eb3f6a98 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -32,6 +32,7 @@ #include "debuggerengine.h" +#include "debuggerinternalconstants.h" #include "debuggeractions.h" #include "debuggercore.h" #include "debuggerplugin.h" diff --git a/src/plugins/debugger/debuggerinternalconstants.h b/src/plugins/debugger/debuggerinternalconstants.h new file mode 100644 index 0000000000000000000000000000000000000000..56e5744c85e46312ebdb17232e3182b18ed8a506 --- /dev/null +++ b/src/plugins/debugger/debuggerinternalconstants.h @@ -0,0 +1,109 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (info@qt.nokia.com) +** +** +** GNU Lesser General Public License Usage +** +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the GNU Lesser General +** Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** Other Usage +** +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +**************************************************************************/ + +#ifndef DEBUGGERINTERNALCONSTANTS_H +#define DEBUGGERINTERNALCONSTANTS_H + +#include <QtCore/QtGlobal> + +namespace Debugger { +namespace Constants { + +// modes and their priorities +const int P_MODE_DEBUG = 85; + +const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common"; +const char * const DEBUGGER_COMMON_SETTINGS_NAME = + QT_TRANSLATE_NOOP("Debugger", "General"); +const char * const DEBUGGER_SETTINGS_CATEGORY = "O.Debugger"; +const char * const DEBUGGER_SETTINGS_TR_CATEGORY = + QT_TRANSLATE_NOOP("Debugger", "Debugger"); +const char * const DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON = + ":/core/images/category_debug.png"; + +namespace Internal { + enum { debug = 0 }; +} // namespace Internal + +const char * const OPENED_BY_DEBUGGER = "OpenedByDebugger"; +const char * const OPENED_WITH_DISASSEMBLY = "DisassemblerView"; +const char * const OPENED_WITH_MEMORY = "MemoryView"; + +// Debug action +const char * const DEBUG = "Debugger.Debug"; +const int P_ACTION_DEBUG = 90; //priority for the modemanager +#ifdef Q_OS_MAC +const char * const DEBUG_KEY = "Ctrl+Y"; +#else +const char * const DEBUG_KEY = "F5"; +#endif + +} // namespace Constants + +enum ModelRoles +{ + DisplaySourceRole = 32, // Qt::UserRole + + EngineStateRole, + EngineCapabilitiesRole, + EngineActionsEnabledRole, + RequestActivationRole, + RequestContextMenuRole, + + // Locals and Watchers + LocalsINameRole, + LocalsEditTypeRole, // A QVariant::type describing the item + LocalsIntegerBaseRole, // Number base 16, 10, 8, 2 + LocalsExpressionRole, + LocalsRawExpressionRole, + LocalsExpandedRole, // The preferred expanded state to the view + LocalsRawTypeRole, // Raw type name + LocalsTypeRole, // Display type name + LocalsTypeFormatListRole, + LocalsTypeFormatRole, // Used to communicate alternative formats to the view + LocalsIndividualFormatRole, + LocalsAddressRole, // Memory address of variable as quint64 + LocalsReferencingAddressRole, // Address referencing for 'Automatically dereferenced pointer' + LocalsSizeRole, // Size of variable as quint + LocalsRawValueRole, // Unformatted value as string + LocalsPointerValueRole, // Pointer value (address) as quint64 + LocalsIsWatchpointAtAddressRole, + LocalsIsWatchpointAtPointerValueRole, + + // Snapshots + SnapshotCapabilityRole +}; + +} // namespace Debugger + +#endif // DEBUGGERINTERNALCONSTANTS_H + diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 414343274c6322993924afeb810f5403ddbc04aa..d3b2e39fedf549456a67aa726e5779b05b81eca6 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -35,6 +35,7 @@ #include "debuggerstartparameters.h" #include "debuggeractions.h" #include "debuggerconstants.h" +#include "debuggerinternalconstants.h" #include "debuggercore.h" #include "debuggerdialogs.h" #include "debuggerengine.h" diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index 782343b7bafde7b0389cec72581bb65e786ea3ab..b1b5cee6f62ad08a1ad190f1f8bf250431348568 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -34,6 +34,7 @@ #include "debuggerruncontrolfactory.h" #include "debuggeractions.h" +#include "debuggerinternalconstants.h" #include "debuggercore.h" #include "debuggerengine.h" #include "debuggermainwindow.h" diff --git a/src/plugins/debugger/disassembleragent.cpp b/src/plugins/debugger/disassembleragent.cpp index 743f015ec27728fd5ffffff31eef41fb86268061..175d802e6af11698b9c19ffd5109da549f5e93ef 100644 --- a/src/plugins/debugger/disassembleragent.cpp +++ b/src/plugins/debugger/disassembleragent.cpp @@ -35,6 +35,7 @@ #include "disassemblerlines.h" #include "breakhandler.h" #include "debuggerengine.h" +#include "debuggerinternalconstants.h" #include "debuggercore.h" #include "debuggerstringutils.h" #include "stackframe.h" diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index e447457df36e9e5f1e1b3b34acbd1be50669de0f..5176941387be4192dfb701dbecd9aef271bb893a 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -35,6 +35,7 @@ #include "gdbengine.h" #include "debuggerstartparameters.h" +#include "debuggerinternalconstants.h" #include "disassemblerlines.h" #include "attachgdbadapter.h" #include "coregdbadapter.h" diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp index 51be51ee532dfc4a2a9c9d77478047548718c23b..f3b5845779a732ec1f4504ef8def8783b2da71c0 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.cpp +++ b/src/plugins/debugger/gdb/gdboptionspage.cpp @@ -33,6 +33,7 @@ #include "gdboptionspage.h" #include "debuggeractions.h" #include "debuggercore.h" +#include "debuggerinternalconstants.h" #include <coreplugin/icore.h> #include <projectexplorer/projectexplorer.h> diff --git a/src/plugins/debugger/memoryagent.cpp b/src/plugins/debugger/memoryagent.cpp index 0639193e5f04f2027cc910c637271c7c9ede731f..db7def50194ebe61e2c9971b92fe26f054349a14 100644 --- a/src/plugins/debugger/memoryagent.cpp +++ b/src/plugins/debugger/memoryagent.cpp @@ -36,6 +36,7 @@ #include "debuggerengine.h" #include "debuggerstartparameters.h" #include "debuggercore.h" +#include "debuggerinternalconstants.h" #include <coreplugin/coreconstants.h> #include <coreplugin/editormanager/editormanager.h> diff --git a/src/plugins/debugger/snapshothandler.cpp b/src/plugins/debugger/snapshothandler.cpp index 61ad440ea0f73cd2663bbc358c5717a4c4dce095..b4dd1c941548c96edc8fbe22b0a8857ebff0a797 100644 --- a/src/plugins/debugger/snapshothandler.cpp +++ b/src/plugins/debugger/snapshothandler.cpp @@ -33,6 +33,7 @@ #include "snapshothandler.h" #include "debuggerconstants.h" +#include "debuggerinternalconstants.h" #include "debuggercore.h" #include "debuggerengine.h" #include "debuggerrunner.h" diff --git a/src/plugins/debugger/snapshotwindow.cpp b/src/plugins/debugger/snapshotwindow.cpp index 18a12e9f7963d27e2b12dd66dea6c0011fe4626a..bc97d2fad093beb9aa584e463e1ebf9a1ea8c0e9 100644 --- a/src/plugins/debugger/snapshotwindow.cpp +++ b/src/plugins/debugger/snapshotwindow.cpp @@ -34,6 +34,7 @@ #include "snapshothandler.h" #include "debuggeractions.h" +#include "debuggerinternalconstants.h" #include "debuggercore.h" #include "debuggerengine.h" @@ -46,7 +47,6 @@ #include <QtGui/QMenu> #include <QtGui/QKeyEvent> - namespace Debugger { namespace Internal { diff --git a/src/plugins/debugger/sourceagent.cpp b/src/plugins/debugger/sourceagent.cpp index 62f4b41aa1acfd88b1dd391bd5a42b30a9fa9f94..d27b343dd3c58c3c03e3da48d9e1a8dc626448fe 100644 --- a/src/plugins/debugger/sourceagent.cpp +++ b/src/plugins/debugger/sourceagent.cpp @@ -34,6 +34,7 @@ #include "breakhandler.h" #include "debuggerengine.h" +#include "debuggerinternalconstants.h" #include "debuggercore.h" #include "debuggerstringutils.h" #include "stackframe.h" diff --git a/src/plugins/debugger/stackwindow.cpp b/src/plugins/debugger/stackwindow.cpp index 02d777db6d6c60aad370c772fc8c561df15d9c87..994be4f0034d7e783d389c190c42c16292e612ed 100644 --- a/src/plugins/debugger/stackwindow.cpp +++ b/src/plugins/debugger/stackwindow.cpp @@ -34,7 +34,6 @@ #include "stackhandler.h" #include "debuggeractions.h" -#include "debuggerconstants.h" #include "debuggercore.h" #include "debuggerengine.h" #include "memoryagent.h" diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index f472ba0a3f51863cb09189eb1fd08d2645a8830f..96604b6dfe33b09d4bb2682c6d0a1ef7888b2b7b 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -33,6 +33,7 @@ #include "watchhandler.h" #include "breakhandler.h" +#include "debuggerinternalconstants.h" #include "debuggeractions.h" #include "debuggercore.h" #include "debuggerengine.h" diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index e6bf4aac16a646341953ddbac42f26d9fc86b7c1..d795b37ddb76c3a6b63d896df2f122b19074afd9 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -36,6 +36,7 @@ #include "registerhandler.h" #include "debuggeractions.h" #include "debuggerconstants.h" +#include "debuggerinternalconstants.h" #include "debuggercore.h" #include "debuggerdialogs.h" #include "debuggerengine.h"