From 147a3c27c4db8d5cb5c2cedba9a51c1bb216d307 Mon Sep 17 00:00:00 2001
From: Orgad Shaneh ")
+ label->setText("
");
+ result += "
";
result += hint;
}
- result += QLatin1String("");
+ result += "";
return result;
}
@@ -311,11 +311,11 @@ QWidget *LocalsAndExpressionsOptionsPage::widget()
auto label = new QLabel(debuggingHelperGroupBox);
label->setTextFormat(Qt::AutoText);
label->setWordWrap(true);
- label->setText(QLatin1String("
" + tr("The debugging helpers are used to produce a nice " "display of objects of certain types like QString or " "std::map in the "Locals and Expressions" view.") - + QLatin1String("
")); + + ""); auto groupBoxCustomDumperCommands = new QGroupBox(debuggingHelperGroupBox); groupBoxCustomDumperCommands->setTitle(tr("Debugging Helper Customization")); diff --git a/src/plugins/debugger/console/console.cpp b/src/plugins/debugger/console/console.cpp index 9391d9f05f1..1ff13a25458 100644 --- a/src/plugins/debugger/console/console.cpp +++ b/src/plugins/debugger/console/console.cpp @@ -104,7 +104,7 @@ Console::Console() m_showDebugButtonAction = new Utils::SavedAction(this); m_showDebugButtonAction->setDefaultValue(true); - m_showDebugButtonAction->setSettingsKey(QLatin1String(CONSOLE), QLatin1String(SHOW_LOG)); + m_showDebugButtonAction->setSettingsKey(CONSOLE, SHOW_LOG); m_showDebugButtonAction->setToolTip(tr("Show debug, log, and info messages.")); m_showDebugButtonAction->setCheckable(true); m_showDebugButtonAction->setChecked(true); @@ -118,7 +118,7 @@ Console::Console() m_showWarningButtonAction = new Utils::SavedAction(this); m_showWarningButtonAction->setDefaultValue(true); - m_showWarningButtonAction->setSettingsKey(QLatin1String(CONSOLE), QLatin1String(SHOW_WARNING)); + m_showWarningButtonAction->setSettingsKey(CONSOLE, SHOW_WARNING); m_showWarningButtonAction->setToolTip(tr("Show warning messages.")); m_showWarningButtonAction->setCheckable(true); m_showWarningButtonAction->setChecked(true); @@ -132,7 +132,7 @@ Console::Console() m_showErrorButtonAction = new Utils::SavedAction(this); m_showErrorButtonAction->setDefaultValue(true); - m_showErrorButtonAction->setSettingsKey(QLatin1String(CONSOLE), QLatin1String(SHOW_ERROR)); + m_showErrorButtonAction->setSettingsKey(CONSOLE, SHOW_ERROR); m_showErrorButtonAction->setToolTip(tr("Show error messages.")); m_showErrorButtonAction->setCheckable(true); m_showErrorButtonAction->setChecked(true); diff --git a/src/plugins/debugger/console/consoleitemdelegate.cpp b/src/plugins/debugger/console/consoleitemdelegate.cpp index 5a4f0becaf4..265ee6ce179 100644 --- a/src/plugins/debugger/console/consoleitemdelegate.cpp +++ b/src/plugins/debugger/console/consoleitemdelegate.cpp @@ -56,7 +56,7 @@ ConsoleItemDelegate::ConsoleItemDelegate(ConsoleItemModel *model, QObject *paren m_errorIcon(Utils::Icons::CRITICAL.icon()), m_expandIcon(Utils::Icons::EXPAND.icon()), m_collapseIcon(Utils::Icons::COLLAPSE.icon()), - m_prompt(Utils::Icon({{QLatin1String(":/utils/images/next.png"), + m_prompt(Utils::Icon({{":/utils/images/next.png", Utils::Theme::TextColorNormal}}, Utils::Icon::Tint).icon()) { } @@ -183,7 +183,7 @@ void ConsoleItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o if (!file.isEmpty()) { QFontMetrics fm(option.font); // Paint FileArea - const int pos = file.lastIndexOf(QLatin1Char('/')); + const int pos = file.lastIndexOf('/'); if (pos != -1) file = file.mid(pos +1); const int realFileWidth = fm.width(file); @@ -269,11 +269,11 @@ QWidget *ConsoleItemDelegate::createEditor(QWidget *parent, { auto editor = new ConsoleEdit(index, parent); // Make the background transparent so that the prompt shines through - editor->setStyleSheet(QLatin1String("QTextEdit {" - "margin-left: 24px;" - "margin-top: 4px;" - "background-color: transparent;" - "}")); + editor->setStyleSheet("QTextEdit {" + "margin-left: 24px;" + "margin-top: 4px;" + "background-color: transparent;" + "}"); connect(editor, &ConsoleEdit::editingFinished, this, [this, editor] { auto delegate = const_castThis switches the Locals and Expressions view to " "automatically dereference pointers. This saves a level in the " "tree view, but also loses data for the now-missing intermediate " @@ -182,71 +181,71 @@ DebuggerSettings::DebuggerSettings() item = new SavedAction(this); item->setDefaultValue(QString()); - item->setSettingsKey(cdbSettingsGroup, QLatin1String("AdditionalArguments")); + item->setSettingsKey(cdbSettingsGroup, "AdditionalArguments"); insertItem(CdbAdditionalArguments, item); item = new SavedAction(this); item->setDefaultValue(QStringList()); - item->setSettingsKey(cdbSettingsGroup, QLatin1String("SymbolPaths")); + item->setSettingsKey(cdbSettingsGroup, "SymbolPaths"); insertItem(CdbSymbolPaths, item); item = new SavedAction(this); item->setDefaultValue(QStringList()); - item->setSettingsKey(cdbSettingsGroup, QLatin1String("SourcePaths")); + item->setSettingsKey(cdbSettingsGroup, "SourcePaths"); insertItem(CdbSourcePaths, item); item = new SavedAction(this); item->setDefaultValue(QStringList()); - item->setSettingsKey(cdbSettingsGroup, QLatin1String("BreakEvent")); + item->setSettingsKey(cdbSettingsGroup, "BreakEvent"); insertItem(CdbBreakEvents, item); item = new SavedAction(this); item->setCheckable(true); item->setDefaultValue(false); - item->setSettingsKey(cdbSettingsGroup, QLatin1String("BreakOnCrtDbgReport")); + item->setSettingsKey(cdbSettingsGroup, "BreakOnCrtDbgReport"); insertItem(CdbBreakOnCrtDbgReport, item); item = new SavedAction(this); item->setCheckable(true); item->setDefaultValue(false); - item->setSettingsKey(cdbSettingsGroup, QLatin1String("CDB_Console")); + item->setSettingsKey(cdbSettingsGroup, "CDB_Console"); insertItem(UseCdbConsole, item); item = new SavedAction(this); item->setCheckable(true); item->setDefaultValue(true); - item->setSettingsKey(cdbSettingsGroup, QLatin1String("BreakpointCorrection")); + item->setSettingsKey(cdbSettingsGroup, "BreakpointCorrection"); insertItem(CdbBreakPointCorrection, item); item = new SavedAction(this); item->setCheckable(true); item->setDefaultValue(true); - item->setSettingsKey(cdbSettingsGroup, QLatin1String("UsePythonDumper")); + item->setSettingsKey(cdbSettingsGroup, "UsePythonDumper"); insertItem(CdbUsePythonDumper, item); item = new SavedAction(this); item->setCheckable(true); item->setDefaultValue(true); - item->setSettingsKey(cdbSettingsGroup, QLatin1String("FirstChanceExceptionTaskEntry")); + item->setSettingsKey(cdbSettingsGroup, "FirstChanceExceptionTaskEntry"); insertItem(FirstChanceExceptionTaskEntry, item); item = new SavedAction(this); item->setCheckable(true); item->setDefaultValue(true); - item->setSettingsKey(cdbSettingsGroup, QLatin1String("SecondChanceExceptionTaskEntry")); + item->setSettingsKey(cdbSettingsGroup, "SecondChanceExceptionTaskEntry"); insertItem(SecondChanceExceptionTaskEntry, item); item = new SavedAction(this); item->setCheckable(true); item->setDefaultValue(false); - item->setSettingsKey(cdbSettingsGroup, QLatin1String("IgnoreFirstChanceAccessViolation")); + item->setSettingsKey(cdbSettingsGroup, "IgnoreFirstChanceAccessViolation"); insertItem(IgnoreFirstChanceAccessViolation, item); // // Locals & Watchers // item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("ShowStandardNamespace")); + item->setSettingsKey(debugModeGroup, "ShowStandardNamespace"); item->setText(tr("Show \"std::\" Namespace in Types")); item->setDialogText(tr("Show \"std::\" namespace in types")); item->setToolTip(tr("
Shows \"std::\" prefix for types from the standard library.")); @@ -256,7 +255,7 @@ DebuggerSettings::DebuggerSettings() insertItem(ShowStdNamespace, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("ShowQtNamespace")); + item->setSettingsKey(debugModeGroup, "ShowQtNamespace"); item->setText(tr("Show Qt's Namespace in Types")); item->setDialogText(tr("Show Qt's namespace in types")); item->setToolTip(tr("
Shows Qt namespace prefix for Qt types. This is only " @@ -267,7 +266,7 @@ DebuggerSettings::DebuggerSettings() insertItem(ShowQtNamespace, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("ShowQObjectNames2")); + item->setSettingsKey(debugModeGroup, "ShowQObjectNames2"); item->setText(tr("Show QObject names if available")); item->setDialogText(tr("Show QObject names if available")); item->setToolTip(tr("
Displays the objectName property of QObject based items. " @@ -279,7 +278,7 @@ DebuggerSettings::DebuggerSettings() insertItem(ShowQObjectNames, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("SortStructMembers")); + item->setSettingsKey(debugModeGroup, "SortStructMembers"); item->setText(tr("Sort Members of Classes and Structs Alphabetically")); item->setDialogText(tr("Sort members of classes and structs alphabetically")); item->setCheckable(true); @@ -291,7 +290,7 @@ DebuggerSettings::DebuggerSettings() // DebuggingHelper // item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("UseDebuggingHelper")); + item->setSettingsKey(debugModeGroup, "UseDebuggingHelper"); item->setText(tr("Use Debugging Helpers")); item->setCheckable(true); item->setDefaultValue(true); @@ -299,7 +298,7 @@ DebuggerSettings::DebuggerSettings() insertItem(UseDebuggingHelpers, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("UseCodeModel")); + item->setSettingsKey(debugModeGroup, "UseCodeModel"); item->setDialogText(tr("Use code model")); item->setToolTip(tr("
Selecting this causes the C++ Code Model being asked " "for variable scope information. This might result in slightly faster " @@ -310,7 +309,7 @@ DebuggerSettings::DebuggerSettings() insertItem(UseCodeModel, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("ShowThreadNames")); + item->setSettingsKey(debugModeGroup, "ShowThreadNames"); item->setToolTip(tr("
Displays names of QThread based threads.")); item->setDialogText(tr("Display thread names")); item->setCheckable(true); @@ -337,7 +336,7 @@ DebuggerSettings::DebuggerSettings() item->setCheckable(true); item->setDefaultValue(true); item->setValue(true); - item->setSettingsKey(debugModeGroup, QLatin1String("AdjustBreakpointLocations")); + item->setSettingsKey(debugModeGroup, "AdjustBreakpointLocations"); insertItem(AdjustBreakpointLocations, item); item = new SavedAction(this); @@ -345,7 +344,7 @@ DebuggerSettings::DebuggerSettings() item->setCheckable(true); item->setDefaultValue(false); item->setValue(false); - item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnThrow")); + item->setSettingsKey(debugModeGroup, "BreakOnThrow"); insertItem(BreakOnThrow, item); item = new SavedAction(this); @@ -353,7 +352,7 @@ DebuggerSettings::DebuggerSettings() item->setCheckable(true); item->setDefaultValue(false); item->setValue(false); - item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnCatch")); + item->setSettingsKey(debugModeGroup, "BreakOnCatch"); insertItem(BreakOnCatch, item); item = new SavedAction(this); @@ -361,7 +360,7 @@ DebuggerSettings::DebuggerSettings() item->setCheckable(true); item->setDefaultValue(false); item->setValue(false); - item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnWarning")); + item->setSettingsKey(debugModeGroup, "BreakOnWarning"); insertItem(BreakOnWarning, item); item = new SavedAction(this); @@ -369,7 +368,7 @@ DebuggerSettings::DebuggerSettings() item->setCheckable(true); item->setDefaultValue(false); item->setValue(false); - item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnFatal")); + item->setSettingsKey(debugModeGroup, "BreakOnFatal"); insertItem(BreakOnFatal, item); item = new SavedAction(this); @@ -377,7 +376,7 @@ DebuggerSettings::DebuggerSettings() item->setCheckable(true); item->setDefaultValue(false); item->setValue(false); - item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnAbort")); + item->setSettingsKey(debugModeGroup, "BreakOnAbort"); insertItem(BreakOnAbort, item); // @@ -385,7 +384,7 @@ DebuggerSettings::DebuggerSettings() // item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("LoadGdbInit")); + item->setSettingsKey(debugModeGroup, "LoadGdbInit"); item->setDefaultValue(QString()); item->setCheckable(true); item->setDefaultValue(true); @@ -393,7 +392,7 @@ DebuggerSettings::DebuggerSettings() insertItem(LoadGdbInit, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("LoadGdbDumpers2")); + item->setSettingsKey(debugModeGroup, "LoadGdbDumpers2"); item->setDefaultValue(QString()); item->setCheckable(true); item->setDefaultValue(false); @@ -401,7 +400,7 @@ DebuggerSettings::DebuggerSettings() insertItem(LoadGdbDumpers, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("AutoEnrichParameters")); + item->setSettingsKey(debugModeGroup, "AutoEnrichParameters"); item->setDefaultValue(QString()); item->setCheckable(true); item->setDefaultValue(true); @@ -409,7 +408,7 @@ DebuggerSettings::DebuggerSettings() insertItem(AutoEnrichParameters, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("UseDynamicType")); + item->setSettingsKey(debugModeGroup, "UseDynamicType"); item->setText(tr("Use Dynamic Object Type for Display")); item->setCheckable(true); item->setDefaultValue(true); @@ -417,95 +416,95 @@ DebuggerSettings::DebuggerSettings() insertItem(UseDynamicType, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("TargetAsync")); + item->setSettingsKey(debugModeGroup, "TargetAsync"); item->setCheckable(true); item->setDefaultValue(false); item->setValue(false); insertItem(TargetAsync, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("WarnOnReleaseBuilds")); + item->setSettingsKey(debugModeGroup, "WarnOnReleaseBuilds"); item->setCheckable(true); item->setDefaultValue(true); insertItem(WarnOnReleaseBuilds, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("GdbStartupCommands")); + item->setSettingsKey(debugModeGroup, "GdbStartupCommands"); item->setDefaultValue(QString()); insertItem(GdbStartupCommands, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("GdbCustomDumperCommands")); + item->setSettingsKey(debugModeGroup, "GdbCustomDumperCommands"); item->setDefaultValue(QString()); insertItem(ExtraDumperCommands, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("ExtraDumperFile")); + item->setSettingsKey(debugModeGroup, "ExtraDumperFile"); item->setDefaultValue(QString()); insertItem(ExtraDumperFile, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("GdbPostAttachCommands")); + item->setSettingsKey(debugModeGroup, "GdbPostAttachCommands"); item->setDefaultValue(QString()); insertItem(GdbPostAttachCommands, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("CloseBuffersOnExit")); + item->setSettingsKey(debugModeGroup, "CloseBuffersOnExit"); item->setCheckable(true); item->setDefaultValue(false); insertItem(CloseSourceBuffersOnExit, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("CloseMemoryBuffersOnExit")); + item->setSettingsKey(debugModeGroup, "CloseMemoryBuffersOnExit"); item->setCheckable(true); item->setDefaultValue(true); insertItem(CloseMemoryBuffersOnExit, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("SwitchModeOnExit")); + item->setSettingsKey(debugModeGroup, "SwitchModeOnExit"); item->setCheckable(true); item->setDefaultValue(false); insertItem(SwitchModeOnExit, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("BreakpointsFullPath")); + item->setSettingsKey(debugModeGroup, "BreakpointsFullPath"); item->setCheckable(true); item->setDefaultValue(false); insertItem(BreakpointsFullPathByDefault, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("RaiseOnInterrupt")); + item->setSettingsKey(debugModeGroup, "RaiseOnInterrupt"); item->setCheckable(true); item->setDefaultValue(true); insertItem(RaiseOnInterrupt, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("AutoQuit")); + item->setSettingsKey(debugModeGroup, "AutoQuit"); item->setText(tr("Automatically Quit Debugger")); item->setCheckable(true); item->setDefaultValue(false); insertItem(AutoQuit, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("MultiInferior")); + item->setSettingsKey(debugModeGroup, "MultiInferior"); item->setCheckable(true); item->setDefaultValue(false); insertItem(MultiInferior, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("IntelFlavor")); + item->setSettingsKey(debugModeGroup, "IntelFlavor"); item->setCheckable(true); item->setDefaultValue(false); insertItem(IntelFlavor, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("IdentifyDebugInfoPackages")); + item->setSettingsKey(debugModeGroup, "IdentifyDebugInfoPackages"); item->setCheckable(true); item->setDefaultValue(false); insertItem(IdentifyDebugInfoPackages, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTips")); + item->setSettingsKey(debugModeGroup, "UseToolTips"); item->setText(tr("Use tooltips in main editor when debugging")); item->setToolTip(tr("
Checking this will enable tooltips for variable " "values during debugging. Since this can slow down debugging and " @@ -516,7 +515,7 @@ DebuggerSettings::DebuggerSettings() insertItem(UseToolTipsInMainEditor, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInLocalsView")); + item->setSettingsKey(debugModeGroup, "UseToolTipsInLocalsView"); item->setText(tr("Use Tooltips in Locals View when Debugging")); item->setToolTip(tr("
Checking this will enable tooltips in the locals " "view during debugging.")); @@ -525,7 +524,7 @@ DebuggerSettings::DebuggerSettings() insertItem(UseToolTipsInLocalsView, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInBreakpointsView")); + item->setSettingsKey(debugModeGroup, "UseToolTipsInBreakpointsView"); item->setText(tr("Use Tooltips in Breakpoints View when Debugging")); item->setToolTip(tr("
Checking this will enable tooltips in the breakpoints " "view during debugging.")); @@ -534,7 +533,7 @@ DebuggerSettings::DebuggerSettings() insertItem(UseToolTipsInBreakpointsView, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInStackView")); + item->setSettingsKey(debugModeGroup, "UseToolTipsInStackView"); item->setText(tr("Use Tooltips in Stack View when Debugging")); item->setToolTip(tr("
Checking this will enable tooltips in the stack " "view during debugging.")); @@ -543,7 +542,7 @@ DebuggerSettings::DebuggerSettings() insertItem(UseToolTipsInStackView, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("UseAddressInBreakpointsView")); + item->setSettingsKey(debugModeGroup, "UseAddressInBreakpointsView"); item->setText(tr("Show Address Data in Breakpoints View when Debugging")); item->setToolTip(tr("
Checking this will show a column with address " "information in the breakpoint view during debugging.")); @@ -552,7 +551,7 @@ DebuggerSettings::DebuggerSettings() insertItem(UseAddressInBreakpointsView, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("UseAddressInStackView")); + item->setSettingsKey(debugModeGroup, "UseAddressInStackView"); item->setText(tr("Show Address Data in Stack View when Debugging")); item->setToolTip(tr("
Checking this will show a column with address " "information in the stack view during debugging.")); @@ -561,14 +560,14 @@ DebuggerSettings::DebuggerSettings() insertItem(UseAddressInStackView, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("SkipKnownFrames")); + item->setSettingsKey(debugModeGroup, "SkipKnownFrames"); item->setText(tr("Skip Known Frames")); item->setCheckable(true); item->setDefaultValue(false); insertItem(SkipKnownFrames, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("EnableReverseDebugging")); + item->setSettingsKey(debugModeGroup, "EnableReverseDebugging"); item->setText(tr("Enable Reverse Debugging")); item->setCheckable(true); item->setDefaultValue(false); @@ -577,7 +576,7 @@ DebuggerSettings::DebuggerSettings() #ifdef Q_OS_WIN item = new RegisterPostMortemAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("RegisterForPostMortem")); + item->setSettingsKey(debugModeGroup, "RegisterForPostMortem"); item->setText(tr("Register For Post-Mortem Debugging")); item->setCheckable(true); item->setDefaultValue(false); @@ -585,32 +584,32 @@ DebuggerSettings::DebuggerSettings() #endif item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("AllPluginBreakpoints")); + item->setSettingsKey(debugModeGroup, "AllPluginBreakpoints"); item->setDefaultValue(true); insertItem(AllPluginBreakpoints, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("SelectedPluginBreakpoints")); + item->setSettingsKey(debugModeGroup, "SelectedPluginBreakpoints"); item->setDefaultValue(false); insertItem(SelectedPluginBreakpoints, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("NoPluginBreakpoints")); + item->setSettingsKey(debugModeGroup, "NoPluginBreakpoints"); item->setDefaultValue(false); insertItem(NoPluginBreakpoints, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("SelectedPluginBreakpointsPattern")); - item->setDefaultValue(QLatin1String(".*")); + item->setSettingsKey(debugModeGroup, "SelectedPluginBreakpointsPattern"); + item->setDefaultValue(".*"); insertItem(SelectedPluginBreakpointsPattern, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("MaximalStackDepth")); + item->setSettingsKey(debugModeGroup, "MaximalStackDepth"); item->setDefaultValue(20); insertItem(MaximalStackDepth, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("DisplayStringLimit")); + item->setSettingsKey(debugModeGroup, "DisplayStringLimit"); item->setToolTip(tr("
The maximum length of string entries in the " "Locals and Expressions pane. Longer than that are cut off " "and displayed with an ellipsis attached.")); @@ -618,7 +617,7 @@ DebuggerSettings::DebuggerSettings() insertItem(DisplayStringLimit, item); item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("MaximalStringLength")); + item->setSettingsKey(debugModeGroup, "MaximalStringLength"); item->setToolTip(tr("
The maximum length for strings in separated windows. "
"Longer strings are cut off and displayed with an ellipsis attached."));
item->setDefaultValue(10000);
@@ -633,7 +632,7 @@ DebuggerSettings::DebuggerSettings()
insertItem(CreateFullBacktrace, item);
item = new SavedAction(this);
- item->setSettingsKey(debugModeGroup, QLatin1String("WatchdogTimeout"));
+ item->setSettingsKey(debugModeGroup, "WatchdogTimeout");
item->setDefaultValue(20);
insertItem(GdbWatchdogTimeout, item);
@@ -641,13 +640,13 @@ DebuggerSettings::DebuggerSettings()
// QML Tools
//
item = new SavedAction(this);
- item->setSettingsKey(debugModeGroup, QLatin1String("ShowQmlObjectTree"));
+ item->setSettingsKey(debugModeGroup, "ShowQmlObjectTree");
item->setDefaultValue(true);
insertItem(ShowQmlObjectTree, item);
- const QString qmlInspectorGroup = QLatin1String("QML.Inspector");
+ const QString qmlInspectorGroup = "QML.Inspector";
item = new SavedAction(this);
- item->setSettingsKey(qmlInspectorGroup, QLatin1String("QmlInspector.ShowAppOnTop"));
+ item->setSettingsKey(qmlInspectorGroup, "QmlInspector.ShowAppOnTop");
item->setDefaultValue(false);
insertItem(ShowAppOnTop, item);
}
diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index f548aa0ee1e..db5731a5aa8 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -172,13 +172,13 @@ QString StartApplicationParameters::displayName() const
const int maxLength = 60;
QString name = FileName::fromString(runnable.executable).fileName()
- + QLatin1Char(' ') + runnable.commandLineArguments;
+ + ' ' + runnable.commandLineArguments;
if (name.size() > 60) {
- int index = name.lastIndexOf(QLatin1Char(' '), maxLength);
+ int index = name.lastIndexOf(' ', maxLength);
if (index == -1)
index = maxLength;
name.truncate(index);
- name += QLatin1String("...");
+ name += "...";
}
if (Kit *kit = KitManager::kit(kitId))
@@ -246,15 +246,15 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
d->localExecutablePathChooser = new PathChooser(this);
d->localExecutablePathChooser->setExpectedKind(PathChooser::File);
d->localExecutablePathChooser->setPromptDialogTitle(tr("Select Executable"));
- d->localExecutablePathChooser->setHistoryCompleter(QLatin1String("LocalExecutable"));
+ d->localExecutablePathChooser->setHistoryCompleter("LocalExecutable");
d->arguments = new FancyLineEdit(this);
- d->arguments->setHistoryCompleter(QLatin1String("CommandlineArguments"));
+ d->arguments->setHistoryCompleter("CommandlineArguments");
d->workingDirectory = new PathChooser(this);
d->workingDirectory->setExpectedKind(PathChooser::ExistingDirectory);
d->workingDirectory->setPromptDialogTitle(tr("Select Working Directory"));
- d->workingDirectory->setHistoryCompleter(QLatin1String("WorkingDirectory"));
+ d->workingDirectory->setHistoryCompleter("WorkingDirectory");
d->runInTerminalCheckBox = new QCheckBox(this);
@@ -277,7 +277,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
d->debuginfoPathChooser->setToolTip(tr(
"Base path for external debug information and debug sources. "
"If empty, $SYSROOT/usr/lib/debug will be chosen."));
- d->debuginfoPathChooser->setHistoryCompleter(QLatin1String("Debugger.DebugLocation.History"));
+ d->debuginfoPathChooser->setHistoryCompleter("Debugger.DebugLocation.History");
auto line = new QFrame(this);
line->setFrameShape(QFrame::HLine);
@@ -369,8 +369,8 @@ void StartApplicationDialog::updateState()
void StartApplicationDialog::run(bool attachRemote)
{
- const QString settingsGroup = QLatin1String("DebugMode");
- const QString arrayName = QLatin1String("StartApplication");
+ const QString settingsGroup = "DebugMode";
+ const QString arrayName = "StartApplication";
QList
Enter the connection parameters as:
" "%6") .arg(Core::Constants::IDE_DISPLAY_NAME, - ext32, ext64, QLatin1String("_NT_DEBUGGER_EXTENSION_PATH"), - QLatin1String("cdb.exe -server tcp:port=1234"), + ext32, ext64, "_NT_DEBUGGER_EXTENSION_PATH", + "cdb.exe -server tcp:port=1234", QLatin1String(cdbConnectionSyntax)); } @@ -647,7 +647,7 @@ QString StartRemoteCdbDialog::connection() const { const QString rc = m_lineEdit->text(); // Transform an IP:POrt ('localhost:1234') specification into full spec - QRegExp ipRegexp(QLatin1String("([\\w\\.\\-_]+):([0-9]{1,4})")); + QRegExp ipRegexp("([\\w\\.\\-_]+):([0-9]{1,4})"); QTC_ASSERT(ipRegexp.isValid(), return QString()); if (ipRegexp.exactMatch(rc)) return QString::fromLatin1("tcp:server=%1,port=%2").arg(ipRegexp.cap(1), ipRegexp.cap(2)); @@ -669,7 +669,7 @@ AddressDialog::AddressDialog(QWidget *parent) : setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); auto hLayout = new QHBoxLayout; - hLayout->addWidget(new QLabel(tr("Enter an address:") + QLatin1Char(' '))); + hLayout->addWidget(new QLabel(tr("Enter an address:") + ' ')); hLayout->addWidget(m_lineEdit); auto vLayout = new QVBoxLayout; @@ -697,7 +697,7 @@ bool AddressDialog::isOkButtonEnabled() const void AddressDialog::setAddress(quint64 a) { - m_lineEdit->setText(QLatin1String("0x") + QString::number(a, 16)); + m_lineEdit->setText("0x" + QString::number(a, 16)); } quint64 AddressDialog::address() const @@ -748,19 +748,19 @@ StartRemoteEngineDialog::StartRemoteEngineDialog(QWidget *parent) setWindowTitle(tr("Start Remote Engine")); d->host = new FancyLineEdit(this); - d->host->setHistoryCompleter(QLatin1String("HostName")); + d->host->setHistoryCompleter("HostName"); d->username = new FancyLineEdit(this); - d->username->setHistoryCompleter(QLatin1String("UserName")); + d->username->setHistoryCompleter("UserName"); d->password = new QLineEdit(this); d->password->setEchoMode(QLineEdit::Password); d->enginePath = new FancyLineEdit(this); - d->enginePath->setHistoryCompleter(QLatin1String("EnginePath")); + d->enginePath->setHistoryCompleter("EnginePath"); d->inferiorPath = new FancyLineEdit(this); - d->inferiorPath->setHistoryCompleter(QLatin1String("InferiorPath")); + d->inferiorPath->setHistoryCompleter("InferiorPath"); d->buttonBox = new QDialogButtonBox(this); d->buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -916,11 +916,11 @@ void TypeFormatsDialog::addTypeFormats(const QString &type0, const DisplayFormats &typeFormats, int current) { QString type = type0; - type.replace(QLatin1String("__"), QLatin1String("::")); + type.replace("__", "::"); int pos = 2; - if (type.startsWith(QLatin1Char('Q'))) + if (type.startsWith('Q')) pos = 0; - else if (type.startsWith(QLatin1String("std::"))) + else if (type.startsWith("std::")) pos = 1; m_ui->pages[pos]->addTypeFormats(type, typeFormats, current); } diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index cbc1be8b779..992fc8cf3a1 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -281,7 +281,7 @@ public: m_toolTipManager(engine) { m_logWindow = new LogWindow(m_engine); // Needed before start() - m_logWindow->setObjectName(QLatin1String(DOCKWIDGET_OUTPUT)); + m_logWindow->setObjectName(DOCKWIDGET_OUTPUT); m_debuggerName = DebuggerEngine::tr("Debugger"); connect(action(EnableReverseDebugging), &SavedAction::valueChanged, @@ -1641,8 +1641,8 @@ void DebuggerEngine::showMessage(const QString &msg, int channel, int timeout) c d->m_logWindow->showOutput(LogInput, msg); break; case LogError: - d->m_logWindow->showInput(LogError, QLatin1String("ERROR: ") + msg); - d->m_logWindow->showOutput(LogError, QLatin1String("ERROR: ") + msg); + d->m_logWindow->showInput(LogError, "ERROR: " + msg); + d->m_logWindow->showOutput(LogError, "ERROR: " + msg); break; case AppOutput: case AppStuff: @@ -2362,7 +2362,7 @@ void DebuggerEngine::handleExecRunToSelectedFunction() if (functionName.isEmpty()) { const QTextBlock block = cursor.block(); const QString line = block.text(); - foreach (const QString &str, line.trimmed().split(QLatin1Char('('))) { + foreach (const QString &str, line.trimmed().split('(')) { QString a; for (int i = str.size(); --i >= 0; ) { if (!str.at(i).isLetterOrNumber()) @@ -2522,7 +2522,7 @@ QString DebuggerEngine::formatStartParameters() const if (!sp.qmlServer.host().isEmpty()) str << "QML server: " << sp.qmlServer.host() << ':' << sp.qmlServer.port() << '\n'; str << "Sysroot: " << sp.sysRoot << '\n'; - str << "Debug Source Location: " << sp.debugSourceLocation.join(QLatin1Char(':')) << '\n'; + str << "Debug Source Location: " << sp.debugSourceLocation.join(':') << '\n'; return rc; } diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index 9d06e9e1e3a..3489ed59b82 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -77,18 +77,18 @@ DebuggerItem::DebuggerItem(const QVariant &id) DebuggerItem::DebuggerItem(const QVariantMap &data) { - m_id = data.value(QLatin1String(DEBUGGER_INFORMATION_ID)).toString(); - m_command = FileName::fromUserInput(data.value(QLatin1String(DEBUGGER_INFORMATION_COMMAND)).toString()); + m_id = data.value(DEBUGGER_INFORMATION_ID).toString(); + m_command = FileName::fromUserInput(data.value(DEBUGGER_INFORMATION_COMMAND).toString()); m_workingDirectory = FileName::fromUserInput(data.value(DEBUGGER_INFORMATION_WORKINGDIRECTORY).toString()); - m_unexpandedDisplayName = data.value(QLatin1String(DEBUGGER_INFORMATION_DISPLAYNAME)).toString(); - m_isAutoDetected = data.value(QLatin1String(DEBUGGER_INFORMATION_AUTODETECTED), false).toBool(); - m_autoDetectionSource = data.value(QLatin1String(DEBUGGER_INFORMATION_AUTODETECTION_SOURCE)).toString(); - m_version = data.value(QLatin1String(DEBUGGER_INFORMATION_VERSION)).toString(); - m_engineType = DebuggerEngineType(data.value(QLatin1String(DEBUGGER_INFORMATION_ENGINETYPE), + m_unexpandedDisplayName = data.value(DEBUGGER_INFORMATION_DISPLAYNAME).toString(); + m_isAutoDetected = data.value(DEBUGGER_INFORMATION_AUTODETECTED, false).toBool(); + m_autoDetectionSource = data.value(DEBUGGER_INFORMATION_AUTODETECTION_SOURCE).toString(); + m_version = data.value(DEBUGGER_INFORMATION_VERSION).toString(); + m_engineType = DebuggerEngineType(data.value(DEBUGGER_INFORMATION_ENGINETYPE, static_cast