Commit 5e410ae6 authored by hjk's avatar hjk Committed by hjk
Browse files

debugger, bookmarks: use char[] for string constants

Change-Id: I2ef319e4556da1b93ae82afd597e0445d1f81d8d
Reviewed-on: http://codereview.qt.nokia.com/1692

Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent bb5c7366
...@@ -36,18 +36,18 @@ ...@@ -36,18 +36,18 @@
namespace Bookmarks { namespace Bookmarks {
namespace Constants { namespace Constants {
const char * const BOOKMARKS_TOGGLE_ACTION = "Bookmarks.Toggle"; const char BOOKMARKS_TOGGLE_ACTION[] = "Bookmarks.Toggle";
const char * const BOOKMARKS_MOVEUP_ACTION = "Bookmarks.MoveUp"; const char BOOKMARKS_MOVEUP_ACTION[] = "Bookmarks.MoveUp";
const char * const BOOKMARKS_MOVEDOWN_ACTION = "Bookmarks.MoveDown"; const char BOOKMARKS_MOVEDOWN_ACTION[] = "Bookmarks.MoveDown";
const char * const BOOKMARKS_PREV_ACTION = "Bookmarks.Previous"; const char BOOKMARKS_PREV_ACTION[] = "Bookmarks.Previous";
const char * const BOOKMARKS_NEXT_ACTION = "Bookmarks.Next"; const char BOOKMARKS_NEXT_ACTION[] = "Bookmarks.Next";
const char * const BOOKMARKS_PREVDIR_ACTION = "Bookmarks.PreviousDirectory"; const char BOOKMARKS_PREVDIR_ACTION[] = "Bookmarks.PreviousDirectory";
const char * const BOOKMARKS_NEXTDIR_ACTION = "Bookmarks.NextDirectory"; const char BOOKMARKS_NEXTDIR_ACTION[] = "Bookmarks.NextDirectory";
const char * const BOOKMARKS_PREVDOC_ACTION = "Bookmarks.PreviousDocument"; const char BOOKMARKS_PREVDOC_ACTION[] = "Bookmarks.PreviousDocument";
const char * const BOOKMARKS_NEXTDOC_ACTION = "Bookmarks.NextDocument"; const char BOOKMARKS_NEXTDOC_ACTION[] = "Bookmarks.NextDocument";
const char * const BOOKMARKS_MENU = "Bookmarks.Menu"; const char BOOKMARKS_MENU[] = "Bookmarks.Menu";
const char * const BOOKMARKS_CONTEXT = "Bookmarks"; const char BOOKMARKS_CONTEXT[] = "Bookmarks";
} // namespace Constants } // namespace Constants
} // namespace Bookmarks } // namespace Bookmarks
......
...@@ -148,10 +148,6 @@ CommonOptionsPage::CommonOptionsPage(const QSharedPointer<GlobalDebuggerOptions> ...@@ -148,10 +148,6 @@ CommonOptionsPage::CommonOptionsPage(const QSharedPointer<GlobalDebuggerOptions>
{ {
} }
CommonOptionsPage::~CommonOptionsPage()
{
}
QString CommonOptionsPage::id() const QString CommonOptionsPage::id() const
{ {
return _(DEBUGGER_COMMON_SETTINGS_ID); return _(DEBUGGER_COMMON_SETTINGS_ID);
...@@ -159,7 +155,8 @@ QString CommonOptionsPage::id() const ...@@ -159,7 +155,8 @@ QString CommonOptionsPage::id() const
QString CommonOptionsPage::displayName() const QString CommonOptionsPage::displayName() const
{ {
return QCoreApplication::translate("Debugger", DEBUGGER_COMMON_SETTINGS_NAME);} return QCoreApplication::translate("Debugger", "General");
}
QString CommonOptionsPage::category() const QString CommonOptionsPage::category() const
{ {
......
...@@ -73,7 +73,6 @@ class CommonOptionsPage : public Core::IOptionsPage ...@@ -73,7 +73,6 @@ class CommonOptionsPage : public Core::IOptionsPage
public: public:
explicit CommonOptionsPage(const QSharedPointer<GlobalDebuggerOptions> &go); explicit CommonOptionsPage(const QSharedPointer<GlobalDebuggerOptions> &go);
virtual ~CommonOptionsPage();
// IOptionsPage // IOptionsPage
QString id() const; QString id() const;
......
...@@ -39,42 +39,42 @@ namespace Debugger { ...@@ -39,42 +39,42 @@ namespace Debugger {
namespace Constants { namespace Constants {
// Debug mode // Debug mode
const char * const MODE_DEBUG = "Mode.Debug"; const char MODE_DEBUG[] = "Mode.Debug";
// Contexts // Contexts
const char * const C_DEBUGMODE = "Debugger.DebugMode"; const char C_DEBUGMODE[] = "Debugger.DebugMode";
const char * const C_CPPDEBUGGER = "Gdb Debugger"; const char C_CPPDEBUGGER[] = "Gdb Debugger";
const char * const C_QMLDEBUGGER = "Qml/JavaScript Debugger"; const char C_QMLDEBUGGER[] = "Qml/JavaScript Debugger";
// Project Explorer run mode (RUN/DEBUG) // Project Explorer run mode (RUN/DEBUG)
const char * const DEBUGMODE = "Debugger.DebugMode"; const char DEBUGMODE[] = "Debugger.DebugMode";
const char * const DEBUGMODE2 = "Debugger.DebugMode2"; // Breaks on main. const char DEBUGMODE2[] = "Debugger.DebugMode2"; // Breaks on main.
// Common actions (accessed by QML inspector) // Common actions (accessed by QML inspector)
const char * const INTERRUPT = "Debugger.Interrupt"; const char INTERRUPT[] = "Debugger.Interrupt";
const char * const CONTINUE = "Debugger.Continue"; const char CONTINUE[] = "Debugger.Continue";
const char * const STOP = "Debugger.Stop"; const char STOP[] = "Debugger.Stop";
const char * const RESET = "Debugger.Reset"; const char RESET[] = "Debugger.Reset";
const char * const STEP = "Debugger.StepLine"; const char STEP[] = "Debugger.StepLine";
const char * const STEPOUT = "Debugger.StepOut"; const char STEPOUT[] = "Debugger.StepOut";
const char * const NEXT = "Debugger.NextLine"; const char NEXT[] = "Debugger.NextLine";
const char * const REVERSE = "Debugger.ReverseDirection"; const char REVERSE[] = "Debugger.ReverseDirection";
const char * const OPERATE_BY_INSTRUCTION = "Debugger.OperateByInstruction"; const char OPERATE_BY_INSTRUCTION[] = "Debugger.OperateByInstruction";
// DebuggerMainWindow dock widget names // DebuggerMainWindow dock widget names
const char * const DOCKWIDGET_BREAK = "Debugger.Docks.Break"; const char DOCKWIDGET_BREAK[] = "Debugger.Docks.Break";
const char * const DOCKWIDGET_MODULES = "Debugger.Docks.Modules"; const char DOCKWIDGET_MODULES[] = "Debugger.Docks.Modules";
const char * const DOCKWIDGET_REGISTER = "Debugger.Docks.Register"; const char DOCKWIDGET_REGISTER[] = "Debugger.Docks.Register";
const char * const DOCKWIDGET_OUTPUT = "Debugger.Docks.Output"; const char DOCKWIDGET_OUTPUT[] = "Debugger.Docks.Output";
const char * const DOCKWIDGET_SNAPSHOTS = "Debugger.Docks.Snapshots"; const char DOCKWIDGET_SNAPSHOTS[] = "Debugger.Docks.Snapshots";
const char * const DOCKWIDGET_STACK = "Debugger.Docks.Stack"; const char DOCKWIDGET_STACK[] = "Debugger.Docks.Stack";
const char * const DOCKWIDGET_SOURCE_FILES = "Debugger.Docks.SourceFiles"; const char DOCKWIDGET_SOURCE_FILES[] = "Debugger.Docks.SourceFiles";
const char * const DOCKWIDGET_THREADS = "Debugger.Docks.Threads"; const char DOCKWIDGET_THREADS[] = "Debugger.Docks.Threads";
const char * const DOCKWIDGET_WATCHERS = "Debugger.Docks.LocalsAndWatchers"; const char DOCKWIDGET_WATCHERS[] = "Debugger.Docks.LocalsAndWatchers";
const char * const DOCKWIDGET_QML_INSPECTOR = "Debugger.Docks.QmlInspector"; const char DOCKWIDGET_QML_INSPECTOR[] = "Debugger.Docks.QmlInspector";
const char * const DOCKWIDGET_QML_SCRIPTCONSOLE = "Debugger.Docks.ScriptConsole"; const char DOCKWIDGET_QML_SCRIPTCONSOLE[] = "Debugger.Docks.ScriptConsole";
const char * const DOCKWIDGET_DEFAULT_AREA = "Debugger.Docks.DefaultArea"; const char DOCKWIDGET_DEFAULT_AREA[] = "Debugger.Docks.DefaultArea";
} // namespace Constants } // namespace Constants
......
...@@ -38,33 +38,26 @@ ...@@ -38,33 +38,26 @@
namespace Debugger { namespace Debugger {
namespace Constants { namespace Constants {
// modes and their priorities const char DEBUGGER_COMMON_SETTINGS_ID[] = "A.Common";
const int P_MODE_DEBUG = 85; const char DEBUGGER_SETTINGS_CATEGORY[] = "O.Debugger";
const char DEBUGGER_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("Debugger", "Debugger");
const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common"; const char DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON[] = ":/core/images/category_debug.png";
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 { namespace Internal {
enum { debug = 0 }; enum { debug = 0 };
} // namespace Internal } // namespace Internal
const char * const OPENED_BY_DEBUGGER = "OpenedByDebugger"; const char OPENED_BY_DEBUGGER[] = "OpenedByDebugger";
const char * const OPENED_WITH_DISASSEMBLY = "DisassemblerView"; const char OPENED_WITH_DISASSEMBLY[] = "DisassemblerView";
const char * const OPENED_WITH_MEMORY = "MemoryView"; const char OPENED_WITH_MEMORY[] = "MemoryView";
// Debug action // Debug action
const char * const DEBUG = "Debugger.Debug"; const char DEBUG[] = "Debugger.Debug";
const int P_ACTION_DEBUG = 90; //priority for the modemanager const int P_ACTION_DEBUG = 90; // Priority for the modemanager.
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
const char * const DEBUG_KEY = "Ctrl+Y"; const char DEBUG_KEY[] = "Ctrl+Y";
#else #else
const char * const DEBUG_KEY = "F5"; const char DEBUG_KEY[] = "F5";
#endif #endif
} // namespace Constants } // namespace Constants
......
...@@ -524,7 +524,7 @@ public: ...@@ -524,7 +524,7 @@ public:
setContext(Context(CC::C_EDITORMANAGER, C_DEBUGMODE, CC::C_NAVIGATION_PANE)); setContext(Context(CC::C_EDITORMANAGER, C_DEBUGMODE, CC::C_NAVIGATION_PANE));
setDisplayName(DebuggerPlugin::tr("Debug")); setDisplayName(DebuggerPlugin::tr("Debug"));
setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Debug.png"))); setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Debug.png")));
setPriority(P_MODE_DEBUG); setPriority(85);
setId(MODE_DEBUG); setId(MODE_DEBUG);
setType(CC::MODE_EDIT_TYPE); setType(CC::MODE_EDIT_TYPE);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment