aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorOrgad Shaneh <[email protected]>2018-10-07 22:38:47 +0300
committerOrgad Shaneh <[email protected]>2018-10-13 16:32:31 +0000
commit147a3c27c4db8d5cb5c2cedba9a51c1bb216d307 (patch)
tree5fd2f6af06da917ca1a7fd5b6fea56fe4c269337 /src/plugins
parentd0d6f9949114c55aa728f99cb321fa0779efcf31 (diff)
Debugger: Strip QLatin1* where possible
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/debugger/analyzer/analyzerutils.cpp2
-rw-r--r--src/plugins/debugger/analyzer/startremotedialog.cpp20
-rw-r--r--src/plugins/debugger/breakhandler.cpp4
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp14
-rw-r--r--src/plugins/debugger/cdb/cdboptionspage.cpp2
-rw-r--r--src/plugins/debugger/cdb/cdbparsehelpers.cpp26
-rw-r--r--src/plugins/debugger/commonoptionspage.cpp14
-rw-r--r--src/plugins/debugger/console/console.cpp6
-rw-r--r--src/plugins/debugger/console/consoleitemdelegate.cpp14
-rw-r--r--src/plugins/debugger/console/consoleitemmodel.cpp4
-rw-r--r--src/plugins/debugger/console/consoleview.cpp40
-rw-r--r--src/plugins/debugger/debuggeractions.cpp161
-rw-r--r--src/plugins/debugger/debuggerdialogs.cpp42
-rw-r--r--src/plugins/debugger/debuggerengine.cpp10
-rw-r--r--src/plugins/debugger/debuggeritem.cpp48
-rw-r--r--src/plugins/debugger/debuggeritemmanager.cpp24
-rw-r--r--src/plugins/debugger/debuggerkitinformation.cpp14
-rw-r--r--src/plugins/debugger/debuggermainwindow.cpp8
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp22
-rw-r--r--src/plugins/debugger/debuggerprotocol.cpp32
-rw-r--r--src/plugins/debugger/debuggerrunconfigurationaspect.cpp22
-rw-r--r--src/plugins/debugger/debuggerruncontrol.cpp2
-rw-r--r--src/plugins/debugger/debuggersourcepathmappingwidget.cpp10
-rw-r--r--src/plugins/debugger/debuggertooltipmanager.cpp68
-rw-r--r--src/plugins/debugger/disassembleragent.cpp2
-rw-r--r--src/plugins/debugger/disassemblerlines.cpp38
-rw-r--r--src/plugins/debugger/enginemanager.cpp2
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp6
-rw-r--r--src/plugins/debugger/imageviewer.cpp2
-rw-r--r--src/plugins/debugger/lldb/lldbengine.cpp4
-rw-r--r--src/plugins/debugger/loadcoredialog.cpp6
-rw-r--r--src/plugins/debugger/logwindow.cpp26
-rw-r--r--src/plugins/debugger/namedemangler/demanglerexceptions.h5
-rw-r--r--src/plugins/debugger/namedemangler/globalparsestate.cpp2
-rw-r--r--src/plugins/debugger/namedemangler/namedemangler.cpp2
-rw-r--r--src/plugins/debugger/namedemangler/parsetreenodes.cpp48
-rw-r--r--src/plugins/debugger/pdb/pdbengine.cpp6
-rw-r--r--src/plugins/debugger/procinterrupt.cpp8
-rw-r--r--src/plugins/debugger/qml/qmlengine.cpp4
-rw-r--r--src/plugins/debugger/qml/qmlinspectoragent.cpp20
-rw-r--r--src/plugins/debugger/registerhandler.cpp24
-rw-r--r--src/plugins/debugger/registerpostmortemaction.cpp4
-rw-r--r--src/plugins/debugger/shared/backtrace.cpp4
-rw-r--r--src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp6
-rw-r--r--src/plugins/debugger/shared/peutils.cpp2
-rw-r--r--src/plugins/debugger/simplifytype.cpp92
-rw-r--r--src/plugins/debugger/sourceagent.cpp4
-rw-r--r--src/plugins/debugger/sourcefileshandler.cpp4
-rw-r--r--src/plugins/debugger/sourceutils.cpp4
-rw-r--r--src/plugins/debugger/stackframe.cpp13
-rw-r--r--src/plugins/debugger/threadshandler.cpp8
-rw-r--r--src/plugins/debugger/unstartedappwatcherdialog.cpp2
-rw-r--r--src/plugins/debugger/watchdata.cpp12
-rw-r--r--src/plugins/debugger/watchdelegatewidgets.cpp8
-rw-r--r--src/plugins/debugger/watchhandler.cpp8
55 files changed, 491 insertions, 494 deletions
diff --git a/src/plugins/debugger/analyzer/analyzerutils.cpp b/src/plugins/debugger/analyzer/analyzerutils.cpp
index 96fb4ef9e52..ec181953951 100644
--- a/src/plugins/debugger/analyzer/analyzerutils.cpp
+++ b/src/plugins/debugger/analyzer/analyzerutils.cpp
@@ -46,7 +46,7 @@ static void moveCursorToEndOfName(QTextCursor *tc)
return;
QChar ch = doc->characterAt(tc->position());
- while (ch.isLetterOrNumber() || ch == QLatin1Char('_')) {
+ while (ch.isLetterOrNumber() || ch == '_') {
tc->movePosition(QTextCursor::NextCharacter);
ch = doc->characterAt(tc->position());
}
diff --git a/src/plugins/debugger/analyzer/startremotedialog.cpp b/src/plugins/debugger/analyzer/startremotedialog.cpp
index efee140a953..07025362629 100644
--- a/src/plugins/debugger/analyzer/startremotedialog.cpp
+++ b/src/plugins/debugger/analyzer/startremotedialog.cpp
@@ -86,12 +86,12 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
verticalLayout->addWidget(d->buttonBox);
QSettings *settings = Core::ICore::settings();
- settings->beginGroup(QLatin1String("AnalyzerStartRemoteDialog"));
+ settings->beginGroup("AnalyzerStartRemoteDialog");
d->kitChooser->populate();
- d->kitChooser->setCurrentKitId(Core::Id::fromSetting(settings->value(QLatin1String("profile"))));
- d->executable->setText(settings->value(QLatin1String("executable")).toString());
- d->workingDirectory->setText(settings->value(QLatin1String("workingDirectory")).toString());
- d->arguments->setText(settings->value(QLatin1String("arguments")).toString());
+ d->kitChooser->setCurrentKitId(Core::Id::fromSetting(settings->value("profile")));
+ d->executable->setText(settings->value("executable").toString());
+ d->workingDirectory->setText(settings->value("workingDirectory").toString());
+ d->arguments->setText(settings->value("arguments").toString());
settings->endGroup();
connect(d->kitChooser, &KitChooser::activated, this, &StartRemoteDialog::validate);
@@ -112,11 +112,11 @@ StartRemoteDialog::~StartRemoteDialog()
void StartRemoteDialog::accept()
{
QSettings *settings = Core::ICore::settings();
- settings->beginGroup(QLatin1String("AnalyzerStartRemoteDialog"));
- settings->setValue(QLatin1String("profile"), d->kitChooser->currentKitId().toString());
- settings->setValue(QLatin1String("executable"), d->executable->text());
- settings->setValue(QLatin1String("workingDirectory"), d->workingDirectory->text());
- settings->setValue(QLatin1String("arguments"), d->arguments->text());
+ settings->beginGroup("AnalyzerStartRemoteDialog");
+ settings->setValue("profile", d->kitChooser->currentKitId().toString());
+ settings->setValue("executable", d->executable->text());
+ settings->setValue("workingDirectory", d->workingDirectory->text());
+ settings->setValue("arguments", d->arguments->text());
settings->endGroup();
QDialog::accept();
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index 916c35c77d6..1a91885b4c9 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -403,7 +403,7 @@ BreakpointDialog::BreakpointDialog(unsigned int enabledParts, QWidget *parent)
m_labelType->setBuddy(m_comboBoxType);
m_pathChooserFileName = new PathChooser(groupBoxBasic);
- m_pathChooserFileName->setHistoryCompleter(QLatin1String("Debugger.Breakpoint.File.History"));
+ m_pathChooserFileName->setHistoryCompleter("Debugger.Breakpoint.File.History");
m_pathChooserFileName->setExpectedKind(PathChooser::File);
m_labelFileName = new QLabel(tr("&File name:"), groupBoxBasic);
m_labelFileName->setBuddy(m_pathChooserFileName);
@@ -1028,7 +1028,7 @@ int BreakHandler::threadSpecFromDisplay(const QString &str)
return ok ? result : -1;
}
-const QString empty(QLatin1Char('-'));
+const QString empty("-");
QVariant BreakpointItem::data(int column, int role) const
{
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index a047ac1d7c5..144dafc8008 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -311,7 +311,7 @@ static QStringList mergeEnvironment(QStringList runConfigEnvironment,
// We do not assume someone sets _NT_DEBUGGER_EXTENSION_PATH in the run
// config, just to make sure, delete any existing entries
const QString cdbExtensionPathVariableAssign =
- QLatin1String(cdbExtensionPathVariableC) + QLatin1Char('=');
+ QLatin1String(cdbExtensionPathVariableC) + '=';
for (QStringList::iterator it = runConfigEnvironment.begin(); it != runConfigEnvironment.end() ; ) {
if (it->startsWith(cdbExtensionPathVariableAssign)) {
it = runConfigEnvironment.erase(it);
@@ -485,7 +485,7 @@ void CdbEngine::setupEngine()
// Make sure that QTestLib uses OutputDebugString for logging.
const QString qtLoggingToConsoleKey = QStringLiteral("QT_LOGGING_TO_CONSOLE");
if (!sp.useTerminal && !inferiorEnvironment.hasKey(qtLoggingToConsoleKey))
- inferiorEnvironment.set(qtLoggingToConsoleKey, QString(QLatin1Char('0')));
+ inferiorEnvironment.set(qtLoggingToConsoleKey, "0");
m_process.setEnvironment(mergeEnvironment(inferiorEnvironment.toStringList(),
extensionFi.absolutePath()));
@@ -1969,7 +1969,7 @@ void CdbEngine::ensureUsing32BitStackInWow64(const DebuggerResponse &response, c
{
// Parsing the header of the stack output to check which bitness
// the cdb is currently using.
- foreach (const QStringRef &line, response.data.data().splitRef(QLatin1Char('\n'))) {
+ foreach (const QStringRef &line, response.data.data().splitRef('\n')) {
if (!line.startsWith("Child"))
continue;
if (line.startsWith("ChildEBP")) {
@@ -2344,9 +2344,9 @@ void CdbEngine::parseOutputLine(QString line)
// for some incomprehensible reasons Microsoft cdb version 6.2 is newer than 6.12
m_autoBreakPointCorrection = major > 6 || (major == 6 && minor >= 2 && minor < 10);
showMessage(line, LogMisc);
- showMessage(QString::fromLatin1("Using ")
+ showMessage("Using "
+ QLatin1String(m_autoBreakPointCorrection ? "CDB " : "codemodel ")
- + QString::fromLatin1("based breakpoint correction."), LogMisc);
+ + "based breakpoint correction.", LogMisc);
}
}
} else if (line.startsWith("ModLoad: ")) {
@@ -2736,8 +2736,8 @@ void CdbEngine::setupScripting(const DebuggerResponse &response)
}
const QString &verOutput = data.childAt(0).data();
- const QString firstToken = verOutput.split(QLatin1Char(' ')).constFirst();
- const QVector<QStringRef> pythonVersion = firstToken.splitRef(QLatin1Char('.'));
+ const QString firstToken = verOutput.split(' ').constFirst();
+ const QVector<QStringRef> pythonVersion = firstToken.splitRef('.');
bool ok = false;
if (pythonVersion.size() == 3) {
diff --git a/src/plugins/debugger/cdb/cdboptionspage.cpp b/src/plugins/debugger/cdb/cdboptionspage.cpp
index 9dacfe34ec1..b6c6a29f0a4 100644
--- a/src/plugins/debugger/cdb/cdboptionspage.cpp
+++ b/src/plugins/debugger/cdb/cdboptionspage.cpp
@@ -145,7 +145,7 @@ QStringList CdbBreakEventWidget::breakEvents() const
const QString filter = filterText(e);
QString s = QLatin1String(eventDescriptions[e].abbreviation);
if (!filter.isEmpty()) {
- s += QLatin1Char(':');
+ s += ':';
s += filter;
}
rc.push_back(s);
diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.cpp b/src/plugins/debugger/cdb/cdbparsehelpers.cpp
index 415d9c2de7e..f91ef452618 100644
--- a/src/plugins/debugger/cdb/cdbparsehelpers.cpp
+++ b/src/plugins/debugger/cdb/cdbparsehelpers.cpp
@@ -66,7 +66,7 @@ QString cdbSourcePathMapping(QString fileName,
// Map parts of the path and ensure a slash follows.
if (fileName.size() > sourceSize && fileName.startsWith(source, Qt::CaseInsensitive)) {
const QChar next = fileName.at(sourceSize);
- if (next == QLatin1Char('\\') || next == QLatin1Char('/')) {
+ if (next == '\\' || next == '/') {
const QString &target = mode == DebuggerToSource ? m.second: m.first;
fileName.replace(0, sourceSize, target);
return fileName;
@@ -105,23 +105,23 @@ static BreakpointParameters fixWinMSVCBreakpoint(const BreakpointParameters &p)
break;
case BreakpointAtExec: { // Emulate by breaking on CreateProcessW().
BreakpointParameters rc(BreakpointByFunction);
- rc.module = QLatin1String("kernel32");
- rc.functionName = QLatin1String("CreateProcessW");
+ rc.module = "kernel32";
+ rc.functionName = "CreateProcessW";
return rc;
}
case BreakpointAtThrow: {
BreakpointParameters rc(BreakpointByFunction);
- rc.functionName = QLatin1String("CxxThrowException"); // MSVC runtime. Potentially ambiguous.
+ rc.functionName = "CxxThrowException"; // MSVC runtime. Potentially ambiguous.
return rc;
}
case BreakpointAtCatch: {
BreakpointParameters rc(BreakpointByFunction);
- rc.functionName = QLatin1String("__CxxCallCatchBlock"); // MSVC runtime. Potentially ambiguous.
+ rc.functionName = "__CxxCallCatchBlock"; // MSVC runtime. Potentially ambiguous.
return rc;
}
case BreakpointAtMain: {
BreakpointParameters rc(BreakpointByFunction);
- rc.functionName = QLatin1String("main");
+ rc.functionName = "main";
return rc;
}
} // switch
@@ -413,12 +413,12 @@ bool parseCdbDisassemblerFunctionLine(const QString &l,
QString *currentFunction, quint64 *functionOffset,
QString *sourceFile)
{
- if (l.isEmpty() || !l.endsWith(QLatin1Char(':')) || l.at(0).isDigit() || l.at(0).isSpace())
+ if (l.isEmpty() || !l.endsWith(':') || l.at(0).isDigit() || l.at(0).isSpace())
return false;
- int functionEnd = l.indexOf(QLatin1Char(' '));
+ int functionEnd = l.indexOf(' ');
if (functionEnd < 0)
functionEnd = l.size() - 1; // Nothing at all, just ':'
- const int offsetPos = l.indexOf(QLatin1String("+0x"));
+ const int offsetPos = l.indexOf("+0x");
if (offsetPos > 0) {
*currentFunction = l.left(offsetPos);
*functionOffset = l.mid(offsetPos + 3, functionEnd - offsetPos - 3).trimmed().toULongLong(nullptr, 16);
@@ -428,10 +428,10 @@ bool parseCdbDisassemblerFunctionLine(const QString &l,
}
sourceFile->clear();
// Parse file and line.
- const int filePos = l.indexOf(QLatin1Char('['), functionEnd);
+ const int filePos = l.indexOf('[', functionEnd);
if (filePos == -1)
return true; // No file
- const int linePos = l.indexOf(QLatin1String(" @ "), filePos + 1);
+ const int linePos = l.indexOf(" @ ", filePos + 1);
if (linePos == -1)
return false;
*sourceFile = l.mid(filePos + 1, linePos - filePos - 1).trimmed();
@@ -454,7 +454,7 @@ bool parseCdbDisassemblerLine(const QString &line, DisassemblerLine *dLine, uint
*sourceLine = 0;
if (line.size() < 6)
return false;
- const QChar blank = QLatin1Char(' ');
+ const QChar blank = ' ';
int addressPos = 0;
// Check for joined source and address in 6.11
const bool hasV611SourceLine = line.at(5).isDigit();
@@ -488,7 +488,7 @@ bool parseCdbDisassemblerLine(const QString &line, DisassemblerLine *dLine, uint
const int instructionPos = rawDataEnd + 1;
bool ok;
QString addressS = line.mid(addressPos, addressEnd - addressPos);
- if (addressS.size() > 9 && addressS.at(8) == QLatin1Char('`'))
+ if (addressS.size() > 9 && addressS.at(8) == '`')
addressS.remove(8, 1);
dLine->address = addressS.toULongLong(&ok, 16);
if (!ok)
diff --git a/src/plugins/debugger/commonoptionspage.cpp b/src/plugins/debugger/commonoptionspage.cpp
index 2514df2c104..0aeee7f2d74 100644
--- a/src/plugins/debugger/commonoptionspage.cpp
+++ b/src/plugins/debugger/commonoptionspage.cpp
@@ -80,7 +80,7 @@ void CommonOptionsPage::apply()
SourcePathMap allPathMap = m_sourceMappingWidget->sourcePathMap();
for (auto it = allPathMap.begin(), end = allPathMap.end(); it != end; ++it) {
const QString key = it.key();
- if (key.startsWith(QLatin1Char('(')))
+ if (key.startsWith('('))
newOptions.sourcePathRegExpMap.append(qMakePair(QRegExp(key), it.value()));
else
newOptions.sourcePathMap.insert(key, it.value());
@@ -118,7 +118,7 @@ QWidget *CommonOptionsPage::widget()
checkBoxUseToolTipsInMainEditor->setText(tr("Use tooltips in main editor while debugging"));
QString t = tr("Stopping and stepping in the debugger "
- "will automatically open views associated with the current location.") + QLatin1Char('\n');
+ "will automatically open views associated with the current location.") + '\n';
auto checkBoxCloseSourceBuffersOnExit = new QCheckBox(behaviorBox);
checkBoxCloseSourceBuffersOnExit->setText(tr("Close temporary source views on debugger exit"));
checkBoxCloseSourceBuffersOnExit->setToolTip(t + tr("Closes automatically opened source views when the debugger exits."));
@@ -263,13 +263,13 @@ QString CommonOptionsPage::msgSetBreakpointAtFunction(const char *function)
QString CommonOptionsPage::msgSetBreakpointAtFunctionToolTip(const char *function,
const QString &hint)
{
- QString result = QLatin1String("<html><head/><body>");
+ QString result = "<html><head/><body>";
result += tr("Always adds a breakpoint on the <i>%1()</i> function.").arg(QLatin1String(function));
if (!hint.isEmpty()) {
- result += QLatin1String("<br>");
+ result += "<br>";
result += hint;
}
- result += QLatin1String("</body></html>");
+ result += "</body></html>";
return result;
}
@@ -311,11 +311,11 @@ QWidget *LocalsAndExpressionsOptionsPage::widget()
auto label = new QLabel(debuggingHelperGroupBox);
label->setTextFormat(Qt::AutoText);
label->setWordWrap(true);
- label->setText(QLatin1String("<html><head/><body>\n<p>")
+ label->setText("<html><head/><body>\n<p>"
+ tr("The debugging helpers are used to produce a nice "
"display of objects of certain types like QString or "
"std::map in the &quot;Locals and Expressions&quot; view.")
- + QLatin1String("</p></body></html>"));
+ + "</p></body></html>");
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_cast<ConsoleItemDelegate*>(this);
emit delegate->commitData(editor);
diff --git a/src/plugins/debugger/console/consoleitemmodel.cpp b/src/plugins/debugger/console/consoleitemmodel.cpp
index 383a0e7b643..525aca0dc0d 100644
--- a/src/plugins/debugger/console/consoleitemmodel.cpp
+++ b/src/plugins/debugger/console/consoleitemmodel.cpp
@@ -87,7 +87,7 @@ int ConsoleItemModel::sizeOfFile(const QFont &font)
if (lastReadOnlyRow < 0)
return 0;
QString filename = static_cast<ConsoleItem *>(rootItem()->childAt(lastReadOnlyRow))->file();
- const int pos = filename.lastIndexOf(QLatin1Char('/'));
+ const int pos = filename.lastIndexOf('/');
if (pos != -1)
filename = filename.mid(pos + 1);
@@ -100,7 +100,7 @@ int ConsoleItemModel::sizeOfFile(const QFont &font)
int ConsoleItemModel::sizeOfLineNumber(const QFont &font)
{
QFontMetrics fm(font);
- return fm.width(QLatin1String("88888"));
+ return fm.width("88888");
}
} // Internal
diff --git a/src/plugins/debugger/console/consoleview.cpp b/src/plugins/debugger/console/consoleview.cpp
index 2891e1aa0bc..9969bfb0f5c 100644
--- a/src/plugins/debugger/console/consoleview.cpp
+++ b/src/plugins/debugger/console/consoleview.cpp
@@ -84,30 +84,30 @@ ConsoleView::ConsoleView(ConsoleItemModel *model, QWidget *parent) :
setHeaderHidden(true);
setRootIsDecorated(false);
setEditTriggers(QAbstractItemView::AllEditTriggers);
- setStyleSheet(QLatin1String("QTreeView::branch:has-siblings:!adjoins-item {"
- "border-image: none;"
- "image: none; }"
- "QTreeView::branch:has-siblings:adjoins-item {"
- "border-image: none;"
- "image: none; }"
- "QTreeView::branch:!has-children:!has-siblings:adjoins-item {"
- "border-image: none;"
- "image: none; }"
- "QTreeView::branch:has-children:!has-siblings:closed,"
- "QTreeView::branch:closed:has-children:has-siblings {"
- "border-image: none;"
- "image: none; }"
- "QTreeView::branch:open:has-children:!has-siblings,"
- "QTreeView::branch:open:has-children:has-siblings {"
- "border-image: none;"
- "image: none; }"));
+ setStyleSheet("QTreeView::branch:has-siblings:!adjoins-item {"
+ "border-image: none;"
+ "image: none; }"
+ "QTreeView::branch:has-siblings:adjoins-item {"
+ "border-image: none;"
+ "image: none; }"
+ "QTreeView::branch:!has-children:!has-siblings:adjoins-item {"
+ "border-image: none;"
+ "image: none; }"
+ "QTreeView::branch:has-children:!has-siblings:closed,"
+ "QTreeView::branch:closed:has-children:has-siblings {"
+ "border-image: none;"
+ "image: none; }"
+ "QTreeView::branch:open:has-children:!has-siblings,"
+ "QTreeView::branch:open:has-children:has-siblings {"
+ "border-image: none;"
+ "image: none; }");
QString baseName = QApplication::style()->objectName();
if (Utils::HostOsInfo::isAnyUnixHost() && !Utils::HostOsInfo::isMacHost()
- && baseName == QLatin1String("windows")) {
+ && baseName == "windows") {
// Sometimes we get the standard windows 95 style as a fallback
- if (QStyleFactory::keys().contains(QLatin1String("Fusion"))) {
- baseName = QLatin1String("fusion"); // Qt5
+ if (QStyleFactory::keys().contains("Fusion")) {
+ baseName = "fusion"; // Qt5
}
}
auto style = new ConsoleViewStyle(baseName);
diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp
index 6d44afdadcd..aeb3cf992e9 100644
--- a/src/plugins/debugger/debuggeractions.cpp
+++ b/src/plugins/debugger/debuggeractions.cpp
@@ -52,10 +52,10 @@ namespace Internal {
void GlobalDebuggerOptions::toSettings() const
{
QSettings *s = Core::ICore::settings();
- s->beginWriteArray(QLatin1String(sourcePathMappingArrayNameC));
+ s->beginWriteArray(sourcePathMappingArrayNameC);
if (!sourcePathMap.isEmpty() || !sourcePathRegExpMap.isEmpty()) {
- const QString sourcePathMappingSourceKey = QLatin1String(sourcePathMappingSourceKeyC);
- const QString sourcePathMappingTargetKey = QLatin1String(sourcePathMappingTargetKeyC);
+ const QString sourcePathMappingSourceKey(sourcePathMappingSourceKeyC);
+ const QString sourcePathMappingTargetKey(sourcePathMappingTargetKeyC);
int i = 0;
for (auto it = sourcePathMap.constBegin(), cend = sourcePathMap.constEnd();
it != cend;
@@ -79,14 +79,14 @@ void GlobalDebuggerOptions::fromSettings()
{
QSettings *s = Core::ICore::settings();
sourcePathMap.clear();
- if (const int count = s->beginReadArray(QLatin1String(sourcePathMappingArrayNameC))) {
- const QString sourcePathMappingSourceKey = QLatin1String(sourcePathMappingSourceKeyC);
- const QString sourcePathMappingTargetKey = QLatin1String(sourcePathMappingTargetKeyC);
+ if (const int count = s->beginReadArray(sourcePathMappingArrayNameC)) {
+ const QString sourcePathMappingSourceKey(sourcePathMappingSourceKeyC);
+ const QString sourcePathMappingTargetKey(sourcePathMappingTargetKeyC);
for (int i = 0; i < count; ++i) {
s->setArrayIndex(i);
const QString key = s->value(sourcePathMappingSourceKey).toString();
const QString value = s->value(sourcePathMappingTargetKey).toString();
- if (key.startsWith(QLatin1Char('(')))
+ if (key.startsWith('('))
sourcePathRegExpMap.append(qMakePair(QRegExp(key), value));
else
sourcePathMap.insert(key, value);
@@ -107,8 +107,8 @@ DebuggerSettings::DebuggerSettings()
{
theDebuggerSettings = this;
- const QString debugModeGroup = QLatin1String(debugModeSettingsGroupC);
- const QString cdbSettingsGroup = QLatin1String(cdbSettingsGroupC);
+ const QString debugModeGroup(debugModeSettingsGroupC);
+ const QString cdbSettingsGroup(cdbSettingsGroupC);
SavedAction *item = nullptr;
@@ -124,35 +124,34 @@ DebuggerSettings::DebuggerSettings()
item->setCheckable(true);
item->setValue(true);
item->setDefaultValue(true);
- item->setSettingsKey(debugModeGroup,
- QLatin1String("AlwaysAdjustColumnWidths"));
+ item->setSettingsKey(debugModeGroup, "AlwaysAdjustColumnWidths");
insertItem(AlwaysAdjustColumnWidths, item);
// Needed by QML Inspector
item = new SavedAction(this);
item->setText(tr("Use Alternating Row Colors"));
- item->setSettingsKey(debugModeGroup, QLatin1String("UseAlternatingRowColours"));
+ item->setSettingsKey(debugModeGroup, "UseAlternatingRowColours");
item->setCheckable(true);
item->setDefaultValue(false);
insertItem(UseAlternatingRowColors, item);
item = new SavedAction(this);
item->setText(tr("Keep Editor Stationary When Stepping"));
- item->setSettingsKey(debugModeGroup, QLatin1String("StationaryEditorWhileStepping"));
+ item->setSettingsKey(debugModeGroup, "StationaryEditorWhileStepping");
item->setCheckable(true);
item->setDefaultValue(false);
insertItem(StationaryEditorWhileStepping, item);
item = new SavedAction(this);
item->setText(tr("Debugger Font Size Follows Main Editor"));
- item->setSettingsKey(debugModeGroup, QLatin1String("FontSizeFollowsEditor"));
+ item->setSettingsKey(debugModeGroup, "FontSizeFollowsEditor");
item->setCheckable(true);
item->setDefaultValue(false);
insertItem(FontSizeFollowsEditor, item);
item = new SavedAction(this);
item->setText(tr("Show a Message Box When Receiving a Signal"));
- item->setSettingsKey(debugModeGroup, QLatin1String("UseMessageBoxForSignals"));
+ item->setSettingsKey(debugModeGroup, "UseMessageBoxForSignals");
item->setCheckable(true);
item->setDefaultValue(true);
item->setValue(true);
@@ -160,7 +159,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this);
item->setText(tr("Log Time Stamps"));
- item->setSettingsKey(debugModeGroup, QLatin1String("LogTimeStamps"));
+ item->setSettingsKey(debugModeGroup, "LogTimeStamps");
item->setCheckable(true);
item->setDefaultValue(false);
insertItem(LogTimeStamps, item);
@@ -169,7 +168,7 @@ DebuggerSettings::DebuggerSettings()
item->setText(tr("Dereference Pointers Automatically"));
item->setCheckable(true);
item->setDefaultValue(true);
- item->setSettingsKey(debugModeGroup, QLatin1String("AutoDerefPointers"));
+ item->setSettingsKey(debugModeGroup, "AutoDerefPointers");
item->setToolTip(tr("<p>This 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("<p>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("<p>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("<p>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("<p>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("<p>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("<p>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("<p>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("<p>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("<p>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("<p>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("<p>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("<p>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("<p>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<StartApplicationParameters> history;
QSettings *settings = ICore::settings();
@@ -585,8 +585,8 @@ static QString cdbRemoteHelp()
"to use TCP/IP as communication protocol.</p><p>Enter the connection parameters as:</p>"
"<pre>%6</pre></body></html>")
.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<int>(NoEngineType)).toInt());
- m_lastModified = data.value(QLatin1String(DEBUGGER_INFORMATION_LASTMODIFIED)).toDateTime();
+ m_lastModified = data.value(DEBUGGER_INFORMATION_LASTMODIFIED).toDateTime();
- foreach (const QString &a, data.value(QLatin1String(DEBUGGER_INFORMATION_ABIS)).toStringList()) {
+ foreach (const QString &a, data.value(DEBUGGER_INFORMATION_ABIS).toStringList()) {
Abi abi = Abi::fromString(a);
if (!abi.isNull())
m_abis.append(abi);
@@ -118,12 +118,12 @@ void DebuggerItem::reinitializeFromFile()
const char *version = "-version";
const QFileInfo fileInfo = m_command.toFileInfo();
m_lastModified = fileInfo.lastModified();
- if (fileInfo.baseName().toLower().contains(QLatin1String("lldb-mi")))
+ if (fileInfo.baseName().toLower().contains("lldb-mi"))
version = "--version";
SynchronousProcess proc;
SynchronousProcessResponse response
- = proc.runBlocking(m_command.toString(), QStringList({QLatin1String(version)}));
+ = proc.runBlocking(m_command.toString(), {QLatin1String(version)});
if (response.result != SynchronousProcessResponse::Finished) {
m_engineType = NoEngineType;
return;
@@ -177,7 +177,7 @@ void DebuggerItem::reinitializeFromFile()
// "cdb version 6.2.9200.16384"
m_engineType = CdbEngineType;
m_abis = Abi::abisOfBinary(m_command);
- m_version = output.section(QLatin1Char(' '), 2);
+ m_version = output.section(' ', 2);
return;
}
if (output.startsWith("Python")) {
@@ -246,22 +246,22 @@ bool DebuggerItem::operator==(const DebuggerItem &other) const
QVariantMap DebuggerItem::toMap() const
{
QVariantMap data;
- data.insert(QLatin1String(DEBUGGER_INFORMATION_DISPLAYNAME), m_unexpandedDisplayName);
- data.insert(QLatin1String(DEBUGGER_INFORMATION_ID), m_id);
- data.insert(QLatin1String(DEBUGGER_INFORMATION_COMMAND), m_command.toString());
- data.insert(QLatin1String(DEBUGGER_INFORMATION_WORKINGDIRECTORY), m_workingDirectory.toString());
- data.insert(QLatin1String(DEBUGGER_INFORMATION_ENGINETYPE), int(m_engineType));
- data.insert(QLatin1String(DEBUGGER_INFORMATION_AUTODETECTED), m_isAutoDetected);
- data.insert(QLatin1String(DEBUGGER_INFORMATION_AUTODETECTION_SOURCE), m_autoDetectionSource);
- data.insert(QLatin1String(DEBUGGER_INFORMATION_VERSION), m_version);
- data.insert(QLatin1String(DEBUGGER_INFORMATION_ABIS), abiNames());
- data.insert(QLatin1String(DEBUGGER_INFORMATION_LASTMODIFIED), m_lastModified);
+ data.insert(DEBUGGER_INFORMATION_DISPLAYNAME, m_unexpandedDisplayName);
+ data.insert(DEBUGGER_INFORMATION_ID, m_id);
+ data.insert(DEBUGGER_INFORMATION_COMMAND, m_command.toString());
+ data.insert(DEBUGGER_INFORMATION_WORKINGDIRECTORY, m_workingDirectory.toString());
+ data.insert(DEBUGGER_INFORMATION_ENGINETYPE, int(m_engineType));
+ data.insert(DEBUGGER_INFORMATION_AUTODETECTED, m_isAutoDetected);
+ data.insert(DEBUGGER_INFORMATION_AUTODETECTION_SOURCE, m_autoDetectionSource);
+ data.insert(DEBUGGER_INFORMATION_VERSION, m_version);
+ data.insert(DEBUGGER_INFORMATION_ABIS, abiNames());
+ data.insert(DEBUGGER_INFORMATION_LASTMODIFIED, m_lastModified);
return data;
}
QString DebuggerItem::displayName() const
{
- if (!m_unexpandedDisplayName.contains(QLatin1Char('%')))
+ if (!m_unexpandedDisplayName.contains('%'))
return m_unexpandedDisplayName;
MacroExpander expander;
@@ -271,7 +271,7 @@ QString DebuggerItem::displayName() const
[this] { return !m_version.isEmpty() ? m_version :
DebuggerKitInformation::tr("Unknown debugger version"); });
expander.registerVariable("Debugger:Abi", DebuggerKitInformation::tr("Debugger"),
- [this] { return !m_abis.isEmpty() ? abiNames().join(QLatin1Char(' ')) :
+ [this] { return !m_abis.isEmpty() ? abiNames().join(' ') :
DebuggerKitInformation::tr("Unknown debugger ABI"); });
return expander.expand(m_unexpandedDisplayName);
}
diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp
index 9877ce2f92b..1cd8b3ec094 100644
--- a/src/plugins/debugger/debuggeritemmanager.cpp
+++ b/src/plugins/debugger/debuggeritemmanager.cpp
@@ -353,7 +353,7 @@ DebuggerItem DebuggerItemConfigWidget::item() const
item.setWorkingDirectory(m_workingDirectoryChooser->fileName());
item.setAutoDetected(m_autodetected);
QList<ProjectExplorer::Abi> abiList;
- foreach (const QString &a, m_abis->text().split(QRegExp(QLatin1String("[^A-Za-z0-9-_]+")))) {
+ foreach (const QString &a, m_abis->text().split(QRegExp("[^A-Za-z0-9-_]+"))) {
if (a.isNull())
continue;
abiList << Abi::fromString(a);
@@ -372,7 +372,7 @@ void DebuggerItemConfigWidget::store() const
void DebuggerItemConfigWidget::setAbis(const QStringList &abiNames)
{
- m_abis->setText(abiNames.join(QLatin1String(", ")));
+ m_abis->setText(abiNames.join(", "));
}
void DebuggerItemConfigWidget::load(const DebuggerItem *item)
@@ -406,9 +406,9 @@ void DebuggerItemConfigWidget::load(const DebuggerItem *item)
"<a href=\"%1\">Windows Console Debugger executable</a>"
" (%2) here.").arg(QLatin1String(debuggingToolsWikiLinkC), versionString)
+ "</p></body></html>";
- versionCommand = QLatin1String("-version");
+ versionCommand = "-version";
} else {
- versionCommand = QLatin1String("--version");
+ versionCommand = "--version";
}
m_cdbLabel->setText(text);
@@ -730,7 +730,7 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers()
SynchronousProcess lldbInfo;
lldbInfo.setTimeoutS(2);
SynchronousProcessResponse response
- = lldbInfo.runBlocking(QLatin1String("xcrun"), {"--find", "lldb"});
+ = lldbInfo.runBlocking("xcrun", {"--find", "lldb"});
if (response.result == Utils::SynchronousProcessResponse::Finished) {
QString lPath = response.allOutput().trimmed();
if (!lPath.isEmpty()) {
@@ -749,8 +749,8 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers()
foreach (const Utils::FileName &base, path) {
dir.setPath(base.toFileInfo().absoluteFilePath());
foreach (const QString &entry, dir.entryList()) {
- if (entry.startsWith(QLatin1String("lldb-platform-"))
- || entry.startsWith(QLatin1String("lldb-gdbserver-"))) {
+ if (entry.startsWith("lldb-platform-")
+ || entry.startsWith("lldb-gdbserver-")) {
continue;
}
suspects.append(FileName::fromString(dir.absoluteFilePath(entry)));
@@ -788,19 +788,19 @@ void DebuggerItemManagerPrivate::readLegacyDebuggers(const FileName &file)
foreach (const QVariant &v, reader.restoreValues()) {
QVariantMap data1 = v.toMap();
- QString kitName = data1.value(QLatin1String("PE.Profile.Name")).toString();
- QVariantMap data2 = data1.value(QLatin1String("PE.Profile.Data")).toMap();
+ QString kitName = data1.value("PE.Profile.Name").toString();
+ QVariantMap data2 = data1.value("PE.Profile.Data").toMap();
QVariant v3 = data2.value(DebuggerKitInformation::id().toString());
QString fn;
if (v3.type() == QVariant::String)
fn = v3.toString();
else
- fn = v3.toMap().value(QLatin1String("Binary")).toString();
+ fn = v3.toMap().value("Binary").toString();
if (fn.isEmpty())
continue;
- if (fn.startsWith(QLatin1Char('{')))
+ if (fn.startsWith('{'))
continue;
- if (fn == QLatin1String("auto"))
+ if (fn == "auto")
continue;
FileName command = FileName::fromUserInput(fn);
if (!command.exists())
diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp
index c3b41bcd4b0..426df5dfa7b 100644
--- a/src/plugins/debugger/debuggerkitinformation.cpp
+++ b/src/plugins/debugger/debuggerkitinformation.cpp
@@ -51,7 +51,7 @@ namespace Debugger {
DebuggerKitInformation::DebuggerKitInformation()
{
- setObjectName(QLatin1String("DebuggerKitInformation"));
+ setObjectName("DebuggerKitInformation");
setId(DebuggerKitInformation::id());
setPriority(28000);
}
@@ -130,11 +130,11 @@ void DebuggerKitInformation::setup(Kit *k)
} else {
// Old structure.
const QMap<QString, QVariant> map = rawId.toMap();
- QString binary = map.value(QLatin1String("Binary")).toString();
- if (binary == QLatin1String("auto")) {
+ QString binary = map.value("Binary").toString();
+ if (binary == "auto") {
// This is close to the "new kit" case, except that we know
// an engine type.
- DebuggerEngineType autoEngine = DebuggerEngineType(map.value(QLatin1String("EngineType")).toInt());
+ DebuggerEngineType autoEngine = DebuggerEngineType(map.value("EngineType").toInt());
if (item.engineType() == autoEngine) {
// Use item if host toolchain fits, but only as fallback.
level = std::min(item.matchTarget(tcAbi), DebuggerItem::MatchesSomewhat);
@@ -185,8 +185,8 @@ void DebuggerKitInformation::fix(Kit *k)
}
QMap<QString, QVariant> map = rawId.toMap();
- QString binary = map.value(QLatin1String("Binary")).toString();
- if (binary == QLatin1String("auto")) {
+ QString binary = map.value("Binary").toString();
+ if (binary == "auto") {
// This should not happen as "auto" is handled by setup() already.
QTC_CHECK(false);
k->setValue(DebuggerKitInformation::id(), QVariant());
@@ -334,7 +334,7 @@ void DebuggerKitInformation::addToMacroExpander(Kit *kit, MacroExpander *expande
[kit]() -> QString {
const DebuggerItem *item = debugger(kit);
return item && !item->abis().isEmpty()
- ? item->abiNames().join(QLatin1Char(' '))
+ ? item->abiNames().join(' ')
: tr("Unknown debugger ABI");
});
}
diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp
index c1586e6edd4..5f84b0a1436 100644
--- a/src/plugins/debugger/debuggermainwindow.cpp
+++ b/src/plugins/debugger/debuggermainwindow.cpp
@@ -188,11 +188,11 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *parent)
hbox->addWidget(closeButton);
auto dock = new QDockWidget(tr("Toolbar"), q);
- dock->setObjectName(QLatin1String("Toolbar"));
+ dock->setObjectName("Toolbar");
dock->setFeatures(QDockWidget::NoDockWidgetFeatures);
dock->setAllowedAreas(Qt::BottomDockWidgetArea);
dock->setTitleBarWidget(new QWidget(dock)); // hide title bar
- dock->setProperty("managed_dockwidget", QLatin1String("true"));
+ dock->setProperty("managed_dockwidget", "true");
toolbar->setParent(dock);
dock->setWidget(toolbar);
m_toolBarDock = dock;
@@ -300,7 +300,7 @@ void DebuggerMainWindow::onModeChanged(Core::Id mode)
Perspective *perspective = theMainWindow->d->m_currentPerspective;
if (!perspective) {
const QSettings *settings = ICore::settings();
- const QString lastPerspectiveId = settings->value(QLatin1String(LAST_PERSPECTIVE_KEY)).toString();
+ const QString lastPerspectiveId = settings->value(LAST_PERSPECTIVE_KEY).toString();
perspective = Perspective::findPerspective(lastPerspectiveId);
// If we don't find a perspective with the stored name, pick any.
// This can happen e.g. when a plugin was disabled that provided
@@ -671,7 +671,7 @@ void Perspective::select()
d->m_lastActiveSubPerspectiveId.clear();
const QString &lastKey = d->m_parentPerspectiveId.isEmpty() ? d->m_id : d->m_parentPerspectiveId;
- ICore::settings()->setValue(QLatin1String(LAST_PERSPECTIVE_KEY), lastKey);
+ ICore::settings()->setValue(LAST_PERSPECTIVE_KEY, lastKey);
}
void PerspectivePrivate::restoreLayout()
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index eb194281d9e..c4d1f9df7da 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -465,7 +465,7 @@ class DebugMode : public IMode
public:
DebugMode()
{
- setObjectName(QLatin1String("DebugMode"));
+ setObjectName("DebugMode");
setContext(Context(C_DEBUGMODE, CC::C_NAVIGATION_PANE));
setDisplayName(DebuggerPlugin::tr("Debug"));
setIcon(Utils::Icon::modeIcon(Icons::MODE_DEBUGGER_CLASSIC,
@@ -504,7 +504,7 @@ public:
mainWindowSplitter->addWidget(mainWindow);
mainWindowSplitter->addWidget(new OutputPanePlaceHolder(MODE_DEBUG, mainWindowSplitter));
auto outputPane = new OutputPanePlaceHolder(MODE_DEBUG, mainWindowSplitter);
- outputPane->setObjectName(QLatin1String("DebuggerOutputPanePlaceHolder"));
+ outputPane->setObjectName("DebuggerOutputPanePlaceHolder");
mainWindowSplitter->addWidget(outputPane);
mainWindowSplitter->setStretchFactor(0, 10);
mainWindowSplitter->setStretchFactor(1, 0);
@@ -517,7 +517,7 @@ public:
splitter->addWidget(mainWindowSplitter);
splitter->setStretchFactor(0, 0);
splitter->setStretchFactor(1, 1);
- splitter->setObjectName(QLatin1String("DebugModeWidget"));
+ splitter->setObjectName("DebugModeWidget");
mainWindow->setCentralWidget(centralEditorWidget);
mainWindow->addSubPerspectiveSwitcher(EngineManager::engineChooser());
@@ -956,7 +956,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
// -wincrashevent <event-handle>:<pid>. A handle used for
// a handshake when attaching to a crashed Windows process.
// This is created by $QTC/src/tools/qtcdebugger/main.cpp:
- // args << QLatin1String("-wincrashevent")
+ // args << "-wincrashevent"
// << QString::fromLatin1("%1:%2").arg(argWinCrashEvent).arg(argProcessId);
if (*it == "-wincrashevent") {
++it;
@@ -2235,7 +2235,7 @@ void showModuleSymbols(const QString &moduleName, const Symbols &symbols)
w->setRootIsDecorated(false);
w->setAlternatingRowColors(true);
w->setSortingEnabled(true);
- w->setObjectName(QLatin1String("Symbols.") + moduleName);
+ w->setObjectName("Symbols." + moduleName);
QStringList header;
header.append(DebuggerPlugin::tr("Symbol"));
header.append(DebuggerPlugin::tr("Address"));
@@ -2264,7 +2264,7 @@ void showModuleSections(const QString &moduleName, const Sections &sections)
w->setRootIsDecorated(false);
w->setAlternatingRowColors(true);
w->setSortingEnabled(true);
- w->setObjectName(QLatin1String("Sections.") + moduleName);
+ w->setObjectName("Sections." + moduleName);
QStringList header;
header.append(DebuggerPlugin::tr("Name"));
header.append(DebuggerPlugin::tr("From"));
@@ -2306,8 +2306,8 @@ void openTextEditor(const QString &titlePattern0, const QString &contents)
EditorManager::IgnoreNavigationHistory);
if (auto textEditor = qobject_cast<BaseTextEditor *>(editor)) {
QString suggestion = titlePattern;
- if (!suggestion.contains(QLatin1Char('.')))
- suggestion.append(QLatin1String(".txt"));
+ if (!suggestion.contains('.'))
+ suggestion.append(".txt");
textEditor->textDocument()->setFallbackSaveAsFileName(suggestion);
}
QTC_ASSERT(editor, return);
@@ -2337,7 +2337,7 @@ static DebuggerPlugin *m_instance = nullptr;
DebuggerPlugin::DebuggerPlugin()
{
- setObjectName(QLatin1String("DebuggerPlugin"));
+ setObjectName("DebuggerPlugin");
m_instance = this;
}
@@ -2507,7 +2507,7 @@ bool wantRunTool(ToolMode toolMode, const QString &toolName)
"Do you want to continue and run the tool in %2 mode?</p></body></html>")
.arg(toolName).arg(currentMode).arg(toolModeString);
if (Utils::CheckableMessageBox::doNotAskAgainQuestion(ICore::mainWindow(),
- title, message, ICore::settings(), QLatin1String("AnalyzerCorrectModeWarning"))
+ title, message, ICore::settings(), "AnalyzerCorrectModeWarning")
!= QDialogButtonBox::Yes)
return false;
}
@@ -2588,7 +2588,7 @@ void DebuggerUnitTests::initTestCase()
// QSKIP("No clang suitable for analyzing found");
s_testRun = true;
- m_tmpDir = new CppTools::Tests::TemporaryCopiedDir(QLatin1String(":/unit-tests"));
+ m_tmpDir = new CppTools::Tests::TemporaryCopiedDir(":/unit-tests");
QVERIFY(m_tmpDir->isValid());
}
diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp
index c414e089096..ac4fad40bbb 100644
--- a/src/plugins/debugger/debuggerprotocol.cpp
+++ b/src/plugins/debugger/debuggerprotocol.cpp
@@ -439,14 +439,14 @@ QString DebuggerResponse::toString() const
void extractGdbVersion(const QString &msg,
int *gdbVersion, int *gdbBuildVersion, bool *isMacGdb, bool *isQnxGdb)
{
- const QChar dot(QLatin1Char('.'));
+ const QChar dot('.');
- const bool ignoreParenthesisContent = msg.contains(QLatin1String("rubenvb"))
- || msg.contains(QLatin1String("openSUSE"))
- || msg.contains(QLatin1String("SUSE Linux Enterprise"));
+ const bool ignoreParenthesisContent = msg.contains("rubenvb")
+ || msg.contains("openSUSE")
+ || msg.contains("SUSE Linux Enterprise");
- const QChar parOpen(QLatin1Char('('));
- const QChar parClose(QLatin1Char(')'));
+ const QChar parOpen('(');
+ const QChar parClose(')');
QString cleaned;
QString build;
@@ -476,8 +476,8 @@ void extractGdbVersion(const QString &msg,
}
}
- *isMacGdb = msg.contains(QLatin1String("Apple version"));
- *isQnxGdb = msg.contains(QLatin1String("qnx"));
+ *isMacGdb = msg.contains("Apple version");
+ *isQnxGdb = msg.contains("qnx");
*gdbVersion = 10000 * cleaned.section(dot, 0, 0).toInt()
+ 100 * cleaned.section(dot, 1, 1).toInt()
@@ -504,7 +504,7 @@ static QString quoteUnprintableLatin1(const QString &ba)
for (int i = 0, n = ba.size(); i != n; ++i) {
const unsigned char c = ba.at(i).unicode();
if (isprint(c)) {
- res += QLatin1Char(c);
+ res += c;
} else {
qsnprintf(buf, sizeof(buf) - 1, "\\%x", int(c));
res += QLatin1String(buf);
@@ -638,18 +638,18 @@ QString decodeData(const QString &ba, const QString &encoding)
}
case DebuggerEncoding::JulianDate: {
const QDate date = dateFromData(ba.toInt());
- return date.isValid() ? date.toString(Qt::TextDate) : QLatin1String("(invalid)");
+ return date.isValid() ? date.toString(Qt::TextDate) : "(invalid)";
}
case DebuggerEncoding::MillisecondsSinceMidnight: {
const QTime time = timeFromData(ba.toInt());
- return time.isValid() ? time.toString(Qt::TextDate) : QLatin1String("(invalid)");
+ return time.isValid() ? time.toString(Qt::TextDate) : "(invalid)";
}
case DebuggerEncoding::JulianDateAndMillisecondsSinceMidnight: {
const int p = ba.indexOf('/');
const QDate date = dateFromData(ba.left(p).toInt());
const QTime time = timeFromData(ba.mid(p + 1 ).toInt());
const QDateTime dateTime = QDateTime(date, time);
- return dateTime.isValid() ? dateTime.toString(Qt::TextDate) : QLatin1String("(invalid)");
+ return dateTime.isValid() ? dateTime.toString(Qt::TextDate) : "(invalid)";
}
case DebuggerEncoding::HexEncodedUnsignedInteger:
case DebuggerEncoding::HexEncodedSignedInteger:
@@ -719,7 +719,7 @@ QString decodeData(const QString &ba, const QString &encoding)
}
if (enc.quotes) {
- const QChar doubleQuote(QLatin1Char('"'));
+ const QChar doubleQuote('"');
result = doubleQuote + result + doubleQuote;
}
return result;
@@ -763,7 +763,7 @@ void DebuggerCommand::arg(const char *name, const QString &value)
void DebuggerCommand::arg(const char *name, const char *value)
{
- args = addToJsonObject(args, name, QLatin1String(value));
+ args = addToJsonObject(args, name, value);
}
void DebuggerCommand::arg(const char *name, const QList<int> &list)
@@ -786,7 +786,7 @@ void DebuggerCommand::arg(const char *value)
{
QTC_ASSERT(args.isArray() || args.isNull(), return);
QJsonArray arr = args.toArray();
- arr.append(QLatin1String(value));
+ arr.append(value);
args = arr;
}
@@ -846,7 +846,7 @@ QString DebuggerCommand::argsToString() const
DebuggerEncoding::DebuggerEncoding(const QString &data)
{
- const QVector<QStringRef> l = data.splitRef(QLatin1Char(':'));
+ const QVector<QStringRef> l = data.splitRef(':');
const QStringRef &t = l.at(0);
if (t == "latin1") {
diff --git a/src/plugins/debugger/debuggerrunconfigurationaspect.cpp b/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
index 9428954cfa2..40b1f1149bb 100644
--- a/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
+++ b/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
@@ -296,29 +296,29 @@ int DebuggerRunConfigurationAspect::portsUsedByDebugger() const
void DebuggerRunConfigurationAspect::toMap(QVariantMap &map) const
{
- map.insert(QLatin1String(USE_CPP_DEBUGGER_KEY), d.useCppDebugger == EnabledLanguage);
- map.insert(QLatin1String(USE_CPP_DEBUGGER_AUTO_KEY), d.useCppDebugger == AutoEnabledLanguage);
- map.insert(QLatin1String(USE_QML_DEBUGGER_KEY), d.useQmlDebugger == EnabledLanguage);
- map.insert(QLatin1String(USE_QML_DEBUGGER_AUTO_KEY), d.useQmlDebugger == AutoEnabledLanguage);
- map.insert(QLatin1String(QML_DEBUG_SERVER_PORT_KEY), d.qmlDebugServerPort);
- map.insert(QLatin1String(USE_MULTIPROCESS_KEY), d.useMultiProcess);
+ map.insert(USE_CPP_DEBUGGER_KEY, d.useCppDebugger == EnabledLanguage);
+ map.insert(USE_CPP_DEBUGGER_AUTO_KEY, d.useCppDebugger == AutoEnabledLanguage);
+ map.insert(USE_QML_DEBUGGER_KEY, d.useQmlDebugger == EnabledLanguage);
+ map.insert(USE_QML_DEBUGGER_AUTO_KEY, d.useQmlDebugger == AutoEnabledLanguage);
+ map.insert(QML_DEBUG_SERVER_PORT_KEY, d.qmlDebugServerPort);
+ map.insert(USE_MULTIPROCESS_KEY, d.useMultiProcess);
}
void DebuggerRunConfigurationAspect::fromMap(const QVariantMap &map)
{
- if (map.value(QLatin1String(USE_CPP_DEBUGGER_AUTO_KEY), false).toBool()) {
+ if (map.value(USE_CPP_DEBUGGER_AUTO_KEY, false).toBool()) {
d.useCppDebugger = AutoEnabledLanguage;
} else {
- bool useCpp = map.value(QLatin1String(USE_CPP_DEBUGGER_KEY), false).toBool();
+ bool useCpp = map.value(USE_CPP_DEBUGGER_KEY, false).toBool();
d.useCppDebugger = useCpp ? EnabledLanguage : DisabledLanguage;
}
- if (map.value(QLatin1String(USE_QML_DEBUGGER_AUTO_KEY), false).toBool()) {
+ if (map.value(USE_QML_DEBUGGER_AUTO_KEY, false).toBool()) {
d.useQmlDebugger = AutoEnabledLanguage;
} else {
- bool useQml = map.value(QLatin1String(USE_QML_DEBUGGER_KEY), false).toBool();
+ bool useQml = map.value(USE_QML_DEBUGGER_KEY, false).toBool();
d.useQmlDebugger = useQml ? EnabledLanguage : DisabledLanguage;
}
- d.useMultiProcess = map.value(QLatin1String(USE_MULTIPROCESS_KEY), false).toBool();
+ d.useMultiProcess = map.value(USE_MULTIPROCESS_KEY, false).toBool();
}
} // namespace Debugger
diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp
index 7acf8550b38..c2345e2081c 100644
--- a/src/plugins/debugger/debuggerruncontrol.cpp
+++ b/src/plugins/debugger/debuggerruncontrol.cpp
@@ -676,7 +676,7 @@ void DebuggerRunTool::start()
DebuggerPlugin::tr("Some breakpoints cannot be handled by the debugger "
"languages currently active, and will be ignored.\n"
"Affected are breakpoints %1")
- .arg(unhandledIds.join(QLatin1String(", ")));
+ .arg(unhandledIds.join(", "));
showMessage(warningMessage, LogWarning);
diff --git a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
index 4d53e55f2d2..5812763fc4c 100644
--- a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
+++ b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
@@ -133,8 +133,8 @@ SourcePathMap SourcePathMappingModel::sourcePathMap() const
// Check a mapping whether it still contains a placeholder.
bool SourcePathMappingModel::isNewPlaceHolder(const Mapping &m) const
{
- const QLatin1Char lessThan('<');
- const QLatin1Char greaterThan('>');
+ const QChar lessThan('<');
+ const QChar greaterThan('>');
return m.first.isEmpty() || m.first.startsWith(lessThan)
|| m.first.endsWith(greaterThan)
|| m.first == m_newSourcePlaceHolder
@@ -253,7 +253,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent
// Edit part
m_targetChooser->setExpectedKind(PathChooser::ExistingDirectory);
- m_targetChooser->setHistoryCompleter(QLatin1String("Debugger.MappingTarget.History"));
+ m_targetChooser->setHistoryCompleter("Debugger.MappingTarget.History");
connect(m_sourceLineEdit, &QLineEdit::textChanged,
this, &DebuggerSourcePathMappingWidget::slotEditSourceFieldChanged);
connect(m_targetChooser, &PathChooser::pathChanged,
@@ -407,8 +407,8 @@ static QString findQtInstallPath(const FileName &qmakePath)
return QString();
QProcess proc;
QStringList args;
- args.append(QLatin1String("-query"));
- args.append(QLatin1String("QT_INSTALL_HEADERS"));
+ args.append("-query");
+ args.append("QT_INSTALL_HEADERS");
proc.start(qmakePath.toString(), args);
if (!proc.waitForStarted()) {
qWarning("%s: Cannot start '%s': %s", Q_FUNC_INFO, qPrintable(qmakePath.toString()),
diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp
index 7b733c6d623..e858bb49d2f 100644
--- a/src/plugins/debugger/debuggertooltipmanager.cpp
+++ b/src/plugins/debugger/debuggertooltipmanager.cpp
@@ -546,7 +546,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget()
setAttribute(Qt::WA_DeleteOnClose);
isPinned = false;
- const QIcon pinIcon(QLatin1String(":/debugger/images/pin.xpm"));
+ const QIcon pinIcon(":/debugger/images/pin.xpm");
pinButton = new QToolButton;
pinButton->setIcon(pinIcon);
@@ -582,7 +582,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget()
QString text;
QTextStream str(&text);
model.forAllItems([&str](ToolTipWatchItem *item) {
- str << QString(item->level(), QLatin1Char('\t'))
+ str << QString(item->level(), '\t')
<< item->name << '\t' << item->value << '\t' << item->type << '\n';
});
QClipboard *clipboard = QApplication::clipboard();
@@ -832,7 +832,7 @@ void DebuggerToolTipHolder::updateTooltip(DebuggerEngine *engine)
// FIXME: The engine should decide on whether it likes
// the context.
const bool sameFrame = context.matchesFrame(frame)
- || context.fileName.endsWith(QLatin1String(".py"));
+ || context.fileName.endsWith(".py");
DEBUG("UPDATE TOOLTIP: STATE " << state << context.iname
<< "PINNED: " << widget->isPinned
<< "SHOW NEEDED: " << widget->isPinned
@@ -940,29 +940,29 @@ static QDate dateFromString(const QString &date)
void DebuggerToolTipHolder::saveSessionData(QXmlStreamWriter &w) const
{
- w.writeStartElement(QLatin1String(toolTipElementC));
+ w.writeStartElement(toolTipElementC);
QXmlStreamAttributes attributes;
-// attributes.append(QLatin1String(toolTipClassAttributeC), QString::fromLatin1(metaObject()->className()));
- attributes.append(QLatin1String(fileNameAttributeC), context.fileName);
+// attributes.append(toolTipClassAttributeC, QString::fromLatin1(metaObject()->className()));
+ attributes.append(fileNameAttributeC, context.fileName);
if (!context.function.isEmpty())
- attributes.append(QLatin1String(functionAttributeC), context.function);
- attributes.append(QLatin1String(textPositionAttributeC), QString::number(context.position));
- attributes.append(QLatin1String(textLineAttributeC), QString::number(context.line));
- attributes.append(QLatin1String(textColumnAttributeC), QString::number(context.column));
- attributes.append(QLatin1String(dateAttributeC), creationDate.toString(QLatin1String("yyyyMMdd")));
+ attributes.append(functionAttributeC, context.function);
+ attributes.append(textPositionAttributeC, QString::number(context.position));
+ attributes.append(textLineAttributeC, QString::number(context.line));
+ attributes.append(textColumnAttributeC, QString::number(context.column));
+ attributes.append(dateAttributeC, creationDate.toString("yyyyMMdd"));
QPoint offset = widget->titleLabel->m_offset;
if (offset.x())
- attributes.append(QLatin1String(offsetXAttributeC), QString::number(offset.x()));
+ attributes.append(offsetXAttributeC, QString::number(offset.x()));
if (offset.y())
- attributes.append(QLatin1String(offsetYAttributeC), QString::number(offset.y()));
- attributes.append(QLatin1String(engineTypeAttributeC), context.engineType);
- attributes.append(QLatin1String(treeExpressionAttributeC), context.expression);
- attributes.append(QLatin1String(treeInameAttributeC), context.iname);
+ attributes.append(offsetYAttributeC, QString::number(offset.y()));
+ attributes.append(engineTypeAttributeC, context.engineType);
+ attributes.append(treeExpressionAttributeC, context.expression);
+ attributes.append(treeInameAttributeC, context.iname);
w.writeAttributes(attributes);
- w.writeStartElement(QLatin1String(treeElementC));
+ w.writeStartElement(treeElementC);
widget->model.forAllItems([&w](ToolTipWatchItem *item) {
- const QString modelItemElement = QLatin1String(modelItemElementC);
+ const QString modelItemElement(modelItemElementC);
for (int i = 0; i < 3; ++i) {
const QString value = item->data(i, Qt::DisplayRole).toString();
if (value.isEmpty())
@@ -1078,36 +1078,36 @@ void DebuggerToolTipManagerPrivate::loadSessionData()
closeAllToolTips();
const QString data = SessionManager::value(sessionSettingsKeyC).toString();
QXmlStreamReader r(data);
- if (r.readNextStartElement() && r.name() == QLatin1String(sessionDocumentC)) {
+ if (r.readNextStartElement() && r.name() == sessionDocumentC) {
while (!r.atEnd()) {
if (readStartElement(r, toolTipElementC)) {
const QXmlStreamAttributes attributes = r.attributes();
DebuggerToolTipContext context;
- context.fileName = attributes.value(QLatin1String(fileNameAttributeC)).toString();
- context.position = attributes.value(QLatin1String(textPositionAttributeC)).toString().toInt();
- context.line = attributes.value(QLatin1String(textLineAttributeC)).toString().toInt();
- context.column = attributes.value(QLatin1String(textColumnAttributeC)).toString().toInt();
- context.function = attributes.value(QLatin1String(functionAttributeC)).toString();
+ context.fileName = attributes.value(fileNameAttributeC).toString();
+ context.position = attributes.value(textPositionAttributeC).toString().toInt();
+ context.line = attributes.value(textLineAttributeC).toString().toInt();
+ context.column = attributes.value(textColumnAttributeC).toString().toInt();
+ context.function = attributes.value(functionAttributeC).toString();
QPoint offset;
- const QString offsetXAttribute = QLatin1String(offsetXAttributeC);
- const QString offsetYAttribute = QLatin1String(offsetYAttributeC);
+ const QString offsetXAttribute(offsetXAttributeC);
+ const QString offsetYAttribute(offsetYAttributeC);
if (attributes.hasAttribute(offsetXAttribute))
offset.setX(attributes.value(offsetXAttribute).toString().toInt());
if (attributes.hasAttribute(offsetYAttribute))
offset.setY(attributes.value(offsetYAttribute).toString().toInt());
context.mousePosition = offset;
- context.iname = attributes.value(QLatin1String(treeInameAttributeC)).toString();
- context.expression = attributes.value(QLatin1String(treeExpressionAttributeC)).toString();
+ context.iname = attributes.value(treeInameAttributeC).toString();
+ context.expression = attributes.value(treeExpressionAttributeC).toString();
- // const QStringRef className = attributes.value(QLatin1String(toolTipClassAttributeC));
- context.engineType = attributes.value(QLatin1String(engineTypeAttributeC)).toString();
- context.creationDate = dateFromString(attributes.value(QLatin1String(dateAttributeC)).toString());
+ // const QStringRef className = attributes.value(toolTipClassAttributeC);
+ context.engineType = attributes.value(engineTypeAttributeC).toString();
+ context.creationDate = dateFromString(attributes.value(dateAttributeC).toString());
bool readTree = context.isValid();
if (!context.creationDate.isValid() || context.creationDate.daysTo(QDate::currentDate()) > toolTipsExpiryDays) {
// DEBUG("Expiring tooltip " << context.fileName << '@' << context.position << " from " << creationDate)
//readTree = false;
- } else { //if (className != QLatin1String("Debugger::Internal::DebuggerToolTipWidget")) {
+ } else { //if (className != "Debugger::Internal::DebuggerToolTipWidget") {
//qWarning("Unable to create debugger tool tip widget of class %s", qPrintable(className.toString()));
//readTree = false;
}
@@ -1136,8 +1136,8 @@ void DebuggerToolTipManagerPrivate::saveSessionData()
QXmlStreamWriter w(&data);
w.writeStartDocument();
- w.writeStartElement(QLatin1String(sessionDocumentC));
- w.writeAttribute(QLatin1String(sessionVersionAttributeC), QLatin1String("1.0"));
+ w.writeStartElement(sessionDocumentC);
+ w.writeAttribute(sessionVersionAttributeC, "1.0");
for (DebuggerToolTipHolder *tooltip : qAsConst(m_tooltips))
if (tooltip->widget->isPinned)
tooltip->saveSessionData(w);
diff --git a/src/plugins/debugger/disassembleragent.cpp b/src/plugins/debugger/disassembleragent.cpp
index 7dc4f65d630..3244919ebe5 100644
--- a/src/plugins/debugger/disassembleragent.cpp
+++ b/src/plugins/debugger/disassembleragent.cpp
@@ -309,7 +309,7 @@ void DisassemblerAgent::setContentsToDocument(const DisassemblerLines &contents)
{
QTC_ASSERT(d, return);
if (!d->document) {
- QString titlePattern = QLatin1String("Disassembler");
+ QString titlePattern = "Disassembler";
IEditor *editor = EditorManager::openEditorWithContents(
Core::Constants::K_DEFAULT_TEXT_EDITOR_ID,
&titlePattern);
diff --git a/src/plugins/debugger/disassemblerlines.cpp b/src/plugins/debugger/disassemblerlines.cpp
index 544f14f8b2a..a809b6fa735 100644
--- a/src/plugins/debugger/disassemblerlines.cpp
+++ b/src/plugins/debugger/disassemblerlines.cpp
@@ -52,12 +52,12 @@ void DisassemblerLine::fromString(const QString &unparsed)
QString addr = unparsed.left(pos);
// MSVC 64bit: Remove 64bit separator 00000000`00a45000'.
- if (addr.size() >= 9 && addr.at(8) == QLatin1Char('`'))
+ if (addr.size() >= 9 && addr.at(8) == '`')
addr.remove(8, 1);
- if (addr.endsWith(QLatin1Char(':'))) // clang
+ if (addr.endsWith(':')) // clang
addr.chop(1);
- if (addr.startsWith(QLatin1String("0x")))
+ if (addr.startsWith("0x"))
addr.remove(0, 2);
bool ok = false;
address = addr.toULongLong(&ok, 16);
@@ -121,7 +121,7 @@ void DisassemblerLines::appendSourceLine(const QString &fileName, uint lineNumbe
QFile file(fileName);
if (file.open(QIODevice::ReadOnly)) {
QTextStream ts(&file);
- cache->lines = ts.readAll().split(QLatin1Char('\n'));
+ cache->lines = ts.readAll().split('\n');
}
}
if (lineNumber >= uint(cache->lines.size()))
@@ -144,42 +144,42 @@ void DisassemblerLines::appendUnparsed(const QString &unparsed)
QString line = unparsed.trimmed();
if (line.isEmpty())
return;
- if (line.startsWith(QLatin1String("Current language:")))
+ if (line.startsWith("Current language:"))
return;
- if (line.startsWith(QLatin1String("Dump of assembler"))) {
+ if (line.startsWith("Dump of assembler")) {
m_lastFunction.clear();
return;
}
- if (line.startsWith(QLatin1String("The current source")))
+ if (line.startsWith("The current source"))
return;
- if (line.startsWith(QLatin1String("End of assembler"))) {
+ if (line.startsWith("End of assembler")) {
m_lastFunction.clear();
return;
}
- if (line.startsWith(QLatin1String("=> ")))
+ if (line.startsWith("=> "))
line = line.mid(3);
- if (line.startsWith(QLatin1String("0x"))) {
+ if (line.startsWith("0x")) {
// Address line. Split at the tab.
- int tab1 = line.indexOf(QLatin1Char('\t'));
+ int tab1 = line.indexOf('\t');
if (tab1 == -1) {
appendComment(line);
return;
}
- int tab2 = line.indexOf(QLatin1Char('\t'), tab1 + 1);
+ int tab2 = line.indexOf('\t', tab1 + 1);
if (tab2 == -1)
tab2 = tab1;
QString address = line.left(tab1);
- if (address.endsWith(QLatin1Char(':')))
+ if (address.endsWith(':'))
address.chop(1);
- int pos1 = address.indexOf(QLatin1Char('<')) + 1;
+ int pos1 = address.indexOf('<') + 1;
DisassemblerLine dl;
dl.bytes = line.mid(tab1, tab2 - tab1).trimmed();
m_bytesLength = qMax(m_bytesLength, tab2 - tab1);
dl.data = line.mid(tab2).trimmed();
- if (pos1 && address.indexOf(QLatin1String("<UNDEFINED> instruction:")) == -1) {
- if (address.endsWith(QLatin1Char('>')))
+ if (pos1 && address.indexOf("<UNDEFINED> instruction:") == -1) {
+ if (address.endsWith('>'))
address.chop(1);
- int pos2 = address.indexOf(QLatin1Char('+'), pos1);
+ int pos2 = address.indexOf('+', pos1);
if (pos1 < pos2) {
QString function = address.mid(pos1, pos2 - pos1);
if (function != m_lastFunction) {
@@ -222,7 +222,7 @@ QString DisassemblerLine::toString(int maxOp) const
else
str += " ";
str += QString(" %1 ").arg(bytes);
- str += QString(maxOp - bytes.size(), QLatin1Char(' '));
+ str += QString(maxOp - bytes.size(), ' ');
str += data;
} else if (isCode()) {
str += someSpace;
@@ -244,7 +244,7 @@ QString DisassemblerLines::toString() const
QString str;
for (int i = 0, n = size(); i != n; ++i) {
str += m_data.at(i).toString(m_bytesLength);
- str += QLatin1Char('\n');
+ str += '\n';
}
return str;
}
diff --git a/src/plugins/debugger/enginemanager.cpp b/src/plugins/debugger/enginemanager.cpp
index 18a380cced1..8e0f1029144 100644
--- a/src/plugins/debugger/enginemanager.cpp
+++ b/src/plugins/debugger/enginemanager.cpp
@@ -69,7 +69,7 @@ QString SnapshotData::function() const
if (m_frames.isEmpty())
return QString();
const StackFrame &frame = m_frames.at(0);
- return frame.function + QLatin1Char(':') + QString::number(frame.line);
+ return frame.function + ':' + QString::number(frame.line);
}
QString SnapshotData::toString() const
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index d367b548c2a..167ec5b0e06 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -2731,7 +2731,7 @@ void GdbEngine::handleShowModuleSections(const DebuggerResponse &response,
// ~" 0xb44a6114->0xb44a6138 at 0x00000114: .note.gnu.build-id ALLOC LOAD READONLY DATA HAS_CONTENTS\n"
if (response.resultClass == ResultDone) {
const QStringList lines = response.consoleStreamOutput.split('\n');
- const QString prefix = QLatin1String(" Object file: ");
+ const QString prefix = " Object file: ";
const QString needle = prefix + moduleName;
Sections sections;
bool active = false;
@@ -3575,7 +3575,7 @@ void GdbEngine::setupEngine()
}
const QString tests = QString::fromLocal8Bit(qgetenv("QTC_DEBUGGER_TESTS"));
- foreach (const QStringRef &test, tests.splitRef(QLatin1Char(',')))
+ foreach (const QStringRef &test, tests.splitRef(','))
m_testCases.insert(test.toInt());
foreach (int test, m_testCases)
showMessage("ENABLING TEST CASE: " + QString::number(test));
@@ -4688,7 +4688,7 @@ static QString findExecutableFromName(const QString &fileNameFromCore, const QSt
return absPath;
// remove possible trailing arguments
- QLatin1Char sep(' ');
+ QChar sep(' ');
QStringList pathFragments = absPath.split(sep);
while (pathFragments.size() > 0) {
QString joined_path = pathFragments.join(sep);
diff --git a/src/plugins/debugger/imageviewer.cpp b/src/plugins/debugger/imageviewer.cpp
index 53f7e9728d9..052e3ac4f1a 100644
--- a/src/plugins/debugger/imageviewer.cpp
+++ b/src/plugins/debugger/imageviewer.cpp
@@ -124,7 +124,7 @@ void ImageViewer::setInfo(const QString &info)
void ImageViewer::clicked(const QString &message)
{
- const QString text = m_info + QLatin1Char('\n')
+ const QString text = m_info + '\n'
+ (message.isEmpty() ? tr("<Click to display color>") : message);
m_infoLabel->setText(text);
}
diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp
index b8d414ad76c..6400908da01 100644
--- a/src/plugins/debugger/lldb/lldbengine.cpp
+++ b/src/plugins/debugger/lldb/lldbengine.cpp
@@ -797,7 +797,7 @@ QString LldbEngine::errorMessage(QProcess::ProcessError error) const
void LldbEngine::handleLldbFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
- notifyDebuggerProcessFinished(exitCode, exitStatus, QLatin1String("LLDB"));
+ notifyDebuggerProcessFinished(exitCode, exitStatus, "LLDB");
}
void LldbEngine::readLldbStandardError()
@@ -960,7 +960,7 @@ void LldbEngine::fetchDisassembler(DisassemblerAgent *agent)
//dl.rawData = line["rawdata"].data();
dl.data = line["rawdata"].data();
if (!dl.data.isEmpty())
- dl.data += QString(30 - dl.data.size(), QLatin1Char(' '));
+ dl.data += QString(30 - dl.data.size(), ' ');
dl.data += fromHex(line["hexdata"].data());
dl.data += line["data"].data();
dl.offset = line["offset"].toInt();
diff --git a/src/plugins/debugger/loadcoredialog.cpp b/src/plugins/debugger/loadcoredialog.cpp
index 1a2fa0af1f7..9221b9b5b63 100644
--- a/src/plugins/debugger/loadcoredialog.cpp
+++ b/src/plugins/debugger/loadcoredialog.cpp
@@ -270,17 +270,17 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
d->selectRemoteCoreButton = new QPushButton(PathChooser::browseButtonLabel(), this);
d->localCoreFileName = new PathChooser(this);
- d->localCoreFileName->setHistoryCompleter(QLatin1String("Debugger.CoreFile.History"));
+ d->localCoreFileName->setHistoryCompleter("Debugger.CoreFile.History");
d->localCoreFileName->setExpectedKind(PathChooser::File);
d->localCoreFileName->setPromptDialogTitle(tr("Select Core File"));
d->localExecFileName = new PathChooser(this);
- d->localExecFileName->setHistoryCompleter(QLatin1String("LocalExecutable"));
+ d->localExecFileName->setHistoryCompleter("LocalExecutable");
d->localExecFileName->setExpectedKind(PathChooser::File);
d->localExecFileName->setPromptDialogTitle(tr("Select Executable"));
d->overrideStartScriptFileName = new PathChooser(this);
- d->overrideStartScriptFileName->setHistoryCompleter(QLatin1String("Debugger.StartupScript.History"));
+ d->overrideStartScriptFileName->setHistoryCompleter("Debugger.StartupScript.History");
d->overrideStartScriptFileName->setExpectedKind(PathChooser::File);
d->overrideStartScriptFileName->setPromptDialogTitle(tr("Select Startup Script"));
diff --git a/src/plugins/debugger/logwindow.cpp b/src/plugins/debugger/logwindow.cpp
index dca4aae5381..e6717091615 100644
--- a/src/plugins/debugger/logwindow.cpp
+++ b/src/plugins/debugger/logwindow.cpp
@@ -175,7 +175,7 @@ private:
{
using Utils::Theme;
Theme *theme = Utils::creatorTheme();
- if (text.size() > 3 && text.at(2) == QLatin1Char(':')) {
+ if (text.size() > 3 && text.at(2) == ':') {
QTextCharFormat format;
format.setForeground(theme->color(Theme::Debugger_LogWindow_LogTime));
setFormat(1, text.size(), format);
@@ -310,7 +310,7 @@ private:
int n = 0;
// cut time string
- if (line.size() > 18 && line.at(0) == QLatin1Char('['))
+ if (line.size() > 18 && line.at(0) == '[')
line = line.mid(18);
//qDebug() << line;
@@ -358,8 +358,8 @@ public:
void gotoResult(int i)
{
- QString needle = QString::number(i) + QLatin1Char('^');
- QString needle2 = QLatin1Char('>') + needle;
+ QString needle = QString::number(i) + '^';
+ QString needle2 = '>' + needle;
QString needle3 = QString::fromLatin1("dtoken(\"%1\")@").arg(i);
QTextCursor cursor(document());
do {
@@ -394,7 +394,7 @@ LogWindow::LogWindow(DebuggerEngine *engine)
: m_engine(engine)
{
setWindowTitle(tr("Debugger &Log"));
- setObjectName(QLatin1String("Log"));
+ setObjectName("Log");
m_ignoreNextInputEcho = false;
@@ -412,7 +412,7 @@ LogWindow::LogWindow(DebuggerEngine *engine)
m_commandEdit = new Utils::FancyLineEdit(this);
m_commandEdit->setFrame(false);
- m_commandEdit->setHistoryCompleter(QLatin1String("DebuggerInput"));
+ m_commandEdit->setHistoryCompleter("DebuggerInput");
auto repeatButton = new QToolButton(this);
repeatButton->setIcon(Icons::STEP_OVER.icon());
@@ -521,12 +521,12 @@ void LogWindow::showOutput(int channel, const QString &output)
return;
const QChar cchar = charForChannel(channel);
- const QChar nchar = QLatin1Char('\n');
+ const QChar nchar = '\n';
QString out;
out.reserve(output.size() + 1000);
- if (output.at(0) != QLatin1Char('~') && boolSetting(LogTimeStamps)) {
+ if (output.at(0) != '~' && boolSetting(LogTimeStamps)) {
out.append(charForChannel(LogTime));
out.append(logTimeStamp());
out.append(nchar);
@@ -536,12 +536,12 @@ void LogWindow::showOutput(int channel, const QString &output)
const int npos = output.indexOf(nchar, pos);
const int nnpos = npos == -1 ? n : npos;
const int l = nnpos - pos;
- if (l != 6 || output.midRef(pos, 6) != QLatin1String("(gdb) ")) {
+ if (l != 6 || output.midRef(pos, 6) != "(gdb) ") {
out.append(cchar);
if (l > 30000) {
// FIXME: QTextEdit asserts on really long lines...
out.append(output.midRef(pos, 30000));
- out.append(QLatin1String(" [...] <cut off>\n"));
+ out.append(" [...] <cut off>\n");
} else {
out.append(output.midRef(pos, l + 1));
}
@@ -631,7 +631,7 @@ QString LogWindow::logTimeStamp()
{
// Cache the last log time entry by ms. If time progresses,
// report the difference to the last time stamp in ms.
- static const QString logTimeFormat(QLatin1String("hh:mm:ss.zzz"));
+ static const QString logTimeFormat("hh:mm:ss.zzz");
static QTime lastTime = QTime::currentTime();
static QString lastTimeStamp = lastTime.toString(logTimeFormat);
@@ -642,9 +642,9 @@ QString LogWindow::logTimeStamp()
lastTimeStamp = lastTime.toString(logTimeFormat);
// Append time elapsed
QString rc = lastTimeStamp;
- rc += QLatin1String(" [");
+ rc += " [";
rc += QString::number(elapsedMS);
- rc += QLatin1String("ms]");
+ rc += "ms]";
return rc;
}
return lastTimeStamp;
diff --git a/src/plugins/debugger/namedemangler/demanglerexceptions.h b/src/plugins/debugger/namedemangler/demanglerexceptions.h
index eb210c3f7df..aa03d80e4f9 100644
--- a/src/plugins/debugger/namedemangler/demanglerexceptions.h
+++ b/src/plugins/debugger/namedemangler/demanglerexceptions.h
@@ -56,7 +56,7 @@ public:
#define DEMANGLER_ASSERT(cond) \
do { \
if (!(cond)) { \
- throw InternalDemanglerException(QLatin1String(Q_FUNC_INFO), QLatin1String(__FILE__), __LINE__); \
+ throw InternalDemanglerException(Q_FUNC_INFO, __FILE__, __LINE__); \
} \
} while (0)
@@ -69,8 +69,7 @@ template <typename T> QSharedPointer<T> demanglerCast(const QSharedPointer<Parse
return out;
}
-#define DEMANGLER_CAST(type, input) demanglerCast<type>(input, QLatin1String(Q_FUNC_INFO), \
- QLatin1String(__FILE__), __LINE__)
+#define DEMANGLER_CAST(type, input) demanglerCast<type>(input, Q_FUNC_INFO, __FILE__, __LINE__)
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/namedemangler/globalparsestate.cpp b/src/plugins/debugger/namedemangler/globalparsestate.cpp
index 90b8e878e56..25e019816af 100644
--- a/src/plugins/debugger/namedemangler/globalparsestate.cpp
+++ b/src/plugins/debugger/namedemangler/globalparsestate.cpp
@@ -43,7 +43,7 @@ char GlobalParseState::advance(int steps)
{
Q_ASSERT(steps > 0);
if (m_pos + steps > m_mangledName.size())
- throw ParseException(QLatin1String("Unexpected end of input"));
+ throw ParseException("Unexpected end of input");
const char c = m_mangledName[m_pos];
m_pos += steps;
diff --git a/src/plugins/debugger/namedemangler/namedemangler.cpp b/src/plugins/debugger/namedemangler/namedemangler.cpp
index 242d663f288..9041543fd0a 100644
--- a/src/plugins/debugger/namedemangler/namedemangler.cpp
+++ b/src/plugins/debugger/namedemangler/namedemangler.cpp
@@ -62,7 +62,7 @@ bool NameDemanglerPrivate::demangle(const QString &mangledName)
MangledNameRule::parse(&m_parseState, ParseTreeNode::Ptr());
if (m_parseState.m_pos != m_parseState.m_mangledName.size())
- throw ParseException(QLatin1String("Unconsumed input"));
+ throw ParseException("Unconsumed input");
if (m_parseState.m_parseStack.count() != 1) {
throw ParseException(QString::fromLatin1("There are %1 elements on the parse stack; "
"expected one.").arg(m_parseState.m_parseStack.count()));
diff --git a/src/plugins/debugger/namedemangler/parsetreenodes.cpp b/src/plugins/debugger/namedemangler/parsetreenodes.cpp
index 556104718fb..e6e7567c457 100644
--- a/src/plugins/debugger/namedemangler/parsetreenodes.cpp
+++ b/src/plugins/debugger/namedemangler/parsetreenodes.cpp
@@ -54,7 +54,7 @@
#define PARSE_RULE_AND_ADD_RESULT_AS_CHILD(nodeType) \
PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_THIS(nodeType, parseState())
-#define CHILD_AT(obj, index) obj->childAt(index, QLatin1String(Q_FUNC_INFO), QLatin1String(__FILE__), __LINE__)
+#define CHILD_AT(obj, index) obj->childAt(index, Q_FUNC_INFO, __FILE__, __LINE__)
#define MY_CHILD_AT(index) CHILD_AT(this, index)
#define CHILD_TO_BYTEARRAY(index) MY_CHILD_AT(index)->toByteArray()
@@ -514,12 +514,12 @@ void CvQualifiersNode::parse()
while (true) {
if (PEEK() == 'V') {
if (hasQualifiers())
- throw ParseException(QLatin1String("Invalid qualifiers: unexpected 'volatile'"));
+ throw ParseException("Invalid qualifiers: unexpected 'volatile'");
m_hasVolatile = true;
ADVANCE();
} else if (PEEK() == 'K') {
if (m_hasConst)
- throw ParseException(QLatin1String("Invalid qualifiers: 'const' appears twice"));
+ throw ParseException("Invalid qualifiers: 'const' appears twice");
m_hasConst = true;
ADVANCE();
} else {
@@ -684,7 +684,7 @@ void ExpressionNode::parse()
while (ExpressionNode::mangledRepresentationStartsWith(PEEK()))
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode);
if (ADVANCE() != '_')
- throw ParseException(QLatin1String("Invalid expression"));
+ throw ParseException("Invalid expression");
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode);
if (PEEK() == 'E')
ADVANCE();
@@ -1269,7 +1269,7 @@ void ExprPrimaryNode::parse()
? BuiltinTypeNode::Ptr()
: CHILD_AT(topLevelTypeNode, 0).dynamicCast<BuiltinTypeNode>();
if (!typeNode)
- throw ParseException(QLatin1String("Invalid type in expr-primary"));
+ throw ParseException("Invalid type in expr-primary");
switch (typeNode->type()) {
case BuiltinTypeNode::UnsignedShortType:
@@ -2046,7 +2046,7 @@ void NumberNode::parse()
{
const char next = PEEK();
if (!mangledRepresentationStartsWith(next))
- throw ParseException(QLatin1String("Invalid number"));
+ throw ParseException("Invalid number");
if (next == 'n') {
m_isNegative = true;
@@ -2756,15 +2756,15 @@ QByteArray LambdaSigNode::toByteArray() const
void ClosureTypeNameNode::parse()
{
if (parseState()->readAhead(2) != "Ul")
- throw ParseException(QLatin1String("Invalid closure-type-name"));
+ throw ParseException("Invalid closure-type-name");
parseState()->advance(2);
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(LambdaSigNode);
if (ADVANCE() != 'E')
- throw ParseException(QLatin1String("invalid closure-type-name"));
+ throw ParseException("invalid closure-type-name");
if (NonNegativeNumberNode<10>::mangledRepresentationStartsWith(PEEK()))
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>);
if (ADVANCE() != '_')
- throw ParseException(QLatin1String("Invalid closure-type-name"));
+ throw ParseException("Invalid closure-type-name");
}
QByteArray ClosureTypeNameNode::toByteArray() const
@@ -2798,7 +2798,7 @@ void UnnamedTypeNameNode::parse()
if (NonNegativeNumberNode<10>::mangledRepresentationStartsWith(PEEK()))
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>);
if (ADVANCE() != '_')
- throw ParseException(QLatin1String("Invalid unnamed-type-node"));
+ throw ParseException("Invalid unnamed-type-node");
} else {
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ClosureTypeNameNode);
}
@@ -2834,7 +2834,7 @@ void DeclTypeNode::parse()
{
const QByteArray start = parseState()->readAhead(2);
if (start != "DT" && start != "Dt")
- throw ParseException(QLatin1String("Invalid decltype"));
+ throw ParseException("Invalid decltype");
parseState()->advance(2);
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode);
if (ADVANCE() != 'E')
@@ -2870,7 +2870,7 @@ void UnresolvedTypeRule::parse(GlobalParseState *parseState)
else if (SubstitutionNode::mangledRepresentationStartsWith(next))
PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_NODE(SubstitutionNode, parseState, parentNode);
else
- throw ParseException(QLatin1String("Invalid unresolved-type"));
+ throw ParseException("Invalid unresolved-type");
}
@@ -2911,7 +2911,7 @@ void DestructorNameNode::parse()
else if (SimpleIdNode::mangledRepresentationStartsWith(next))
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SimpleIdNode);
else
- throw ParseException(QLatin1String("Invalid destructor-name"));
+ throw ParseException("Invalid destructor-name");
}
QByteArray DestructorNameNode::toByteArray() const
@@ -2965,7 +2965,7 @@ void BaseUnresolvedNameNode::parse()
parseState()->advance(2);
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(DestructorNameNode);
} else {
- throw ParseException(QLatin1String("Invalid <base-unresolved-name>"));
+ throw ParseException("Invalid <base-unresolved-name>");
}
}
@@ -2992,12 +2992,12 @@ bool InitializerNode::mangledRepresentationStartsWith(char c)
void InitializerNode::parse()
{
if (parseState()->readAhead(2) != "pi")
- throw ParseException(QLatin1String("Invalid initializer"));
+ throw ParseException("Invalid initializer");
parseState()->advance(2);
while (ExpressionNode::mangledRepresentationStartsWith(PEEK()))
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode);
if (ADVANCE() != 'E')
- throw ParseException(QLatin1String("Invalid initializer"));
+ throw ParseException("Invalid initializer");
}
QByteArray InitializerNode::toByteArray() const
@@ -3044,20 +3044,20 @@ void UnresolvedNameNode::parse()
UnresolvedQualifierLevelRule::parse(parseState());
while (UnresolvedQualifierLevelRule::mangledRepresentationStartsWith(PEEK()));
if (ADVANCE() != 'E')
- throw ParseException(QLatin1String("Invalid unresolved-name"));
+ throw ParseException("Invalid unresolved-name");
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(BaseUnresolvedNameNode);
} else if (UnresolvedTypeRule::mangledRepresentationStartsWith(PEEK())) {
if (m_globalNamespace)
- throw ParseException(QLatin1String("Invalid unresolved-name"));
+ throw ParseException("Invalid unresolved-name");
UnresolvedTypeRule::parse(parseState());
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(BaseUnresolvedNameNode);
} else {
if (!UnresolvedQualifierLevelRule::mangledRepresentationStartsWith(PEEK()))
- throw ParseException(QLatin1String("Invalid unresolved-name"));
+ throw ParseException("Invalid unresolved-name");
while (UnresolvedQualifierLevelRule::mangledRepresentationStartsWith(PEEK()))
UnresolvedQualifierLevelRule::parse(parseState());
if (ADVANCE() != 'E')
- throw ParseException(QLatin1String("Invalid unresolved-name"));
+ throw ParseException("Invalid unresolved-name");
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(BaseUnresolvedNameNode);
}
} else {
@@ -3103,19 +3103,19 @@ void FunctionParamNode::parse()
if (NonNegativeNumberNode<10>::mangledRepresentationStartsWith(PEEK()))
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>);
if (ADVANCE() != '_')
- throw ParseException(QLatin1String("Invalid function-param"));
+ throw ParseException("Invalid function-param");
} else if (parseState()->readAhead(2) == "fL") {
parseState()->advance(2);
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>);
if (ADVANCE() != 'p')
- throw ParseException(QLatin1String("Invalid function-param"));
+ throw ParseException("Invalid function-param");
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(CvQualifiersNode);
if (NonNegativeNumberNode<10>::mangledRepresentationStartsWith(PEEK()))
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>);
if (ADVANCE() != '_')
- throw ParseException(QLatin1String("Invalid function-param"));
+ throw ParseException("Invalid function-param");
} else {
- throw ParseException(QLatin1String("Invalid function-param"));
+ throw ParseException("Invalid function-param");
}
}
diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp
index 4ac397e9695..4afd0676069 100644
--- a/src/plugins/debugger/pdb/pdbengine.cpp
+++ b/src/plugins/debugger/pdb/pdbengine.cpp
@@ -115,7 +115,7 @@ void PdbEngine::setupEngine()
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
m_interpreter = runParameters().interpreter;
- QString bridge = ICore::resourcePath() + QLatin1String("/debugger/pdbbridge.py");
+ QString bridge = ICore::resourcePath() + "/debugger/pdbbridge.py";
connect(&m_proc, &QProcess::errorOccurred, this, &PdbEngine::handlePdbError);
connect(&m_proc, static_cast<void(QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::finished),
@@ -135,7 +135,7 @@ void PdbEngine::setupEngine()
QStringList args = {bridge, scriptFile.fileName()};
args.append(Utils::QtcProcess::splitArgs(runParameters().inferior.workingDirectory));
- showMessage("STARTING " + m_interpreter + QLatin1Char(' ') + args.join(QLatin1Char(' ')));
+ showMessage("STARTING " + m_interpreter + ' ' + args.join(' '));
m_proc.setEnvironment(runParameters().debugger.environment.toStringList());
m_proc.start(m_interpreter, args);
@@ -428,7 +428,7 @@ QString PdbEngine::errorMessage(QProcess::ProcessError error) const
return tr("An error occurred when attempting to read from "
"the Pdb process. For example, the process may not be running.");
default:
- return tr("An unknown error in the Pdb process occurred.") + QLatin1Char(' ');
+ return tr("An unknown error in the Pdb process occurred.") + ' ';
}
}
diff --git a/src/plugins/debugger/procinterrupt.cpp b/src/plugins/debugger/procinterrupt.cpp
index bc241d9d3bb..085747ea60d 100644
--- a/src/plugins/debugger/procinterrupt.cpp
+++ b/src/plugins/debugger/procinterrupt.cpp
@@ -143,11 +143,11 @@ GDB 32bit | Api | Api | NA | Win32
if (breakApi == UseDebugBreakApi) {
ok = DebugBreakProcess(inferior);
if (!ok)
- *errorMessage = QLatin1String("DebugBreakProcess failed: ") + Utils::winErrorMessage(GetLastError());
+ *errorMessage = "DebugBreakProcess failed: " + Utils::winErrorMessage(GetLastError());
} else {
const QString executable = breakApi == UseWin32Interrupt
- ? QCoreApplication::applicationDirPath() + QLatin1String("/win32interrupt.exe")
- : QCoreApplication::applicationDirPath() + QLatin1String("/win64interrupt.exe");
+ ? QCoreApplication::applicationDirPath() + "/win32interrupt.exe"
+ : QCoreApplication::applicationDirPath() + "/win64interrupt.exe";
if (!QFile::exists(executable)) {
*errorMessage = QString::fromLatin1("%1 does not exist. If you have built %2 "
"on your own, checkout "
@@ -165,7 +165,7 @@ GDB 32bit | Api | Api | NA | Win32
break;
default:
*errorMessage = QDir::toNativeSeparators(executable)
- + QLatin1String(" could not break the process.");
+ + " could not break the process.";
break;
}
break;
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index bbd7684bf9a..26647100c99 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -1031,7 +1031,7 @@ void QmlEngine::updateCurrentContext()
return;
}
- debuggerConsole()->setContext(tr("Context:") + QLatin1Char(' ')
+ debuggerConsole()->setContext(tr("Context:") + ' '
+ (context.isEmpty() ? tr("Global QML Context") : context));
}
@@ -1576,7 +1576,7 @@ QmlV8ObjectData QmlEnginePrivate::extractData(const QVariant &data) const
objectData.value = dataMap.value(VALUE);
} else if (type == "string") {
- QLatin1Char quote('"');
+ QChar quote('"');
objectData.type = "string";
objectData.value = QString(quote + dataMap.value(VALUE).toString() + quote);
diff --git a/src/plugins/debugger/qml/qmlinspectoragent.cpp b/src/plugins/debugger/qml/qmlinspectoragent.cpp
index de47d33eff0..f9c9d903a11 100644
--- a/src/plugins/debugger/qml/qmlinspectoragent.cpp
+++ b/src/plugins/debugger/qml/qmlinspectoragent.cpp
@@ -128,8 +128,8 @@ QmlInspectorAgent::QmlInspectorAgent(QmlEngine *engine, QmlDebugConnection *conn
this, &QmlInspectorAgent::toolsClientStateChanged);
// toolbar
- m_selectAction->setObjectName(QLatin1String("QML Select Action"));
- m_zoomAction->setObjectName(QLatin1String("QML Zoom Action"));
+ m_selectAction->setObjectName("QML Select Action");
+ m_zoomAction->setObjectName("QML Zoom Action");
m_selectAction->setCheckable(true);
m_zoomAction->setCheckable(true);
m_showAppOnTopAction->setCheckable(true);
@@ -223,7 +223,7 @@ bool QmlInspectorAgent::selectObjectInTree(int debugId)
// we may have to fetch it
m_objectToSelect = debugId;
using namespace QmlDebug::Constants;
- if (m_engineClient->objectName() == QLatin1String(QDECLARATIVE_ENGINE)) {
+ if (m_engineClient->objectName() == QDECLARATIVE_ENGINE) {
// reset current Selection
QString root = m_qmlEngine->watchHandler()->watchItem(QModelIndex())->iname;
m_qmlEngine->watchHandler()->setCurrentItem(root);
@@ -322,9 +322,9 @@ void QmlInspectorAgent::onResult(quint32 queryId, const QVariant &value,
|| type == "RESET_BINDING_R"
|| type == "SET_METHOD_BODY_R") {
// FIXME: This is not supported anymore.
- QString msg = QLatin1String(type) + tr("Success:");
- msg += QLatin1Char(' ');
- msg += value.toBool() ? QLatin1Char('1') : QLatin1Char('0');
+ QString msg = type + tr("Success:");
+ msg += ' ';
+ msg += value.toBool() ? '1' : '0';
// if (!value.toBool())
// emit automaticUpdateFailed();
log(LogReceive, msg);
@@ -366,7 +366,7 @@ void QmlInspectorAgent::newObject(int engineId, int /*objectId*/, int /*parentId
{
qCDebug(qmlInspectorLog) << __FUNCTION__ << "()";
- log(LogReceive, QLatin1String("OBJECT_CREATED"));
+ log(LogReceive, "OBJECT_CREATED");
if (m_engine.debugId() != engineId)
return;
@@ -456,7 +456,7 @@ void QmlInspectorAgent::queryEngineContext()
if (!isConnected() || !boolSetting(ShowQmlObjectTree))
return;
- log(LogSend, QLatin1String("LIST_OBJECTS"));
+ log(LogSend, "LIST_OBJECTS");
m_rootContextQueryId
= m_engineClient->queryRootContexts(m_engine);
@@ -469,7 +469,7 @@ void QmlInspectorAgent::fetchObject(int debugId)
if (!isConnected() || !boolSetting(ShowQmlObjectTree))
return;
- log(LogSend, QLatin1String("FETCH_OBJECT ") + QString::number(debugId));
+ log(LogSend, "FETCH_OBJECT " + QString::number(debugId));
quint32 queryId = m_engineClient->queryObject(debugId);
qCDebug(qmlInspectorLog) << __FUNCTION__ << '(' << debugId << ')'
<< " - query id" << queryId;
@@ -590,7 +590,7 @@ void QmlInspectorAgent::buildDebugIdHashRecursive(const ObjectReference &ref)
// handle the case where the url contains the revision number encoded.
//(for object created by the debugger)
- static QRegExp rx(QLatin1String("(.*)_(\\d+):(\\d+)$"));
+ static QRegExp rx("(.*)_(\\d+):(\\d+)$");
if (rx.exactMatch(fileUrl.path())) {
fileUrl.setPath(rx.cap(1));
rev = rx.cap(2).toInt();
diff --git a/src/plugins/debugger/registerhandler.cpp b/src/plugins/debugger/registerhandler.cpp
index c3be1132d86..281ae32965b 100644
--- a/src/plugins/debugger/registerhandler.cpp
+++ b/src/plugins/debugger/registerhandler.cpp
@@ -119,7 +119,7 @@ public:
painter->setPen(lightColor);
// FIXME: performance? this changes only on real font changes.
QFontMetrics fm(option.font);
- int charWidth = qMax(fm.width(QLatin1Char('x')), fm.width(QLatin1Char('0')));
+ int charWidth = qMax(fm.width('x'), fm.width('0'));
QString str = index.data(Qt::DisplayRole).toString();
int x = option.rect.x();
bool light = !paintRed;
@@ -174,26 +174,26 @@ void Register::guessMissingData()
static QString subTypeName(RegisterKind kind, int size, RegisterFormat format)
{
- QString name(QLatin1Char('['));
+ QString name('[');
switch (kind) {
- case IntegerRegister: name += QLatin1Char('i'); break;
- case FloatRegister: name += QLatin1Char('f'); break;
+ case IntegerRegister: name += 'i'; break;
+ case FloatRegister: name += 'f'; break;
default: break;
}
name += QString::number(size);
switch (format) {
- case BinaryFormat: name += QLatin1Char('b'); break;
- case OctalFormat: name += QLatin1Char('o'); break;
- case DecimalFormat: name += QLatin1Char('u'); break;
- case SignedDecimalFormat: name += QLatin1Char('s'); break;
- case HexadecimalFormat: name += QLatin1Char('x'); break;
- case CharacterFormat: name += QLatin1Char('c'); break;
+ case BinaryFormat: name += 'b'; break;
+ case OctalFormat: name += 'o'; break;
+ case DecimalFormat: name += 'u'; break;
+ case SignedDecimalFormat: name += 's'; break;
+ case HexadecimalFormat: name += 'x'; break;
+ case CharacterFormat: name += 'c'; break;
}
- name += QLatin1Char(']');
+ name += ']';
return name;
}
@@ -492,7 +492,7 @@ Qt::ItemFlags RegisterItem::flags(int column) const
{
const Qt::ItemFlags notEditable = Qt::ItemIsSelectable|Qt::ItemIsEnabled;
// Can edit registers if they are hex numbers and not arrays.
- if (column == 1) // && IntegerWatchLineEdit::isUnsignedHexNumber(QLatin1String(m_reg.display)))
+ if (column == 1) // && IntegerWatchLineEdit::isUnsignedHexNumber(m_reg.display))
return notEditable | Qt::ItemIsEditable;
return notEditable;
}
diff --git a/src/plugins/debugger/registerpostmortemaction.cpp b/src/plugins/debugger/registerpostmortemaction.cpp
index a4e6bb87a0f..0b74bbabab7 100644
--- a/src/plugins/debugger/registerpostmortemaction.cpp
+++ b/src/plugins/debugger/registerpostmortemaction.cpp
@@ -47,8 +47,8 @@ namespace Internal {
void RegisterPostMortemAction::registerNow(const QVariant &value)
{
const bool boolValue = value.toBool();
- const QString debuggerExe = QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + QLatin1Char('/')
- + QLatin1String(debuggerApplicationFileC) + QLatin1String(".exe"));
+ const QString debuggerExe = QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + '/'
+ + QLatin1String(debuggerApplicationFileC) + ".exe");
const ushort *debuggerWString = debuggerExe.utf16();
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
diff --git a/src/plugins/debugger/shared/backtrace.cpp b/src/plugins/debugger/shared/backtrace.cpp
index bca1a628b3a..df2270e9bef 100644
--- a/src/plugins/debugger/shared/backtrace.cpp
+++ b/src/plugins/debugger/shared/backtrace.cpp
@@ -48,9 +48,9 @@ void dumpBacktrace(int maxdepth)
qDebug() << "0x" + QByteArray::number(quintptr(bt[i]), 16);
QProcess proc;
QStringList args;
- args.append(QLatin1String("-e"));
+ args.append("-e");
args.append(QCoreApplication::arguments().at(0));
- proc.start(QLatin1String("addr2line"), args);
+ proc.start("addr2line", args);
proc.waitForStarted();
for (int i = 0; i < qMin(size, maxdepth); i++)
proc.write("0x" + QByteArray::number(quintptr(bt[i]), 16) + '\n');
diff --git a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp
index 63bc34193cf..0c86728f214 100644
--- a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp
+++ b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp
@@ -55,7 +55,7 @@ CacheDirectoryDialog::CacheDirectoryDialog(QWidget *parent) :
auto formLayout = new QFormLayout;
m_chooser->setExpectedKind(Utils::PathChooser::ExistingDirectory);
- m_chooser->setHistoryCompleter(QLatin1String("Debugger.CdbCacheDir.History"));
+ m_chooser->setHistoryCompleter("Debugger.CdbCacheDir.History");
m_chooser->setMinimumWidth(400);
formLayout->addRow(tr("Path:"), m_chooser);
@@ -189,10 +189,10 @@ QString CdbSymbolPathListEditor::symbolPath(const QString &cacheDir,
CdbSymbolPathListEditor::SymbolPathMode mode)
{
if (mode == SymbolCachePath)
- return QLatin1String(symbolCachePrefixC) + QDir::toNativeSeparators(cacheDir);
+ return symbolCachePrefixC + QDir::toNativeSeparators(cacheDir);
QString s = QLatin1String(symbolServerPrefixC);
if (!cacheDir.isEmpty())
- s += QDir::toNativeSeparators(cacheDir) + QLatin1Char('*');
+ s += QDir::toNativeSeparators(cacheDir) + '*';
s += QLatin1String(symbolServerPostfixC);
return s;
}
diff --git a/src/plugins/debugger/shared/peutils.cpp b/src/plugins/debugger/shared/peutils.cpp
index 1973cf3afe1..ab4d2f5a428 100644
--- a/src/plugins/debugger/shared/peutils.cpp
+++ b/src/plugins/debugger/shared/peutils.cpp
@@ -288,7 +288,7 @@ bool getPDBFiles(const QString &peExecutableFileName, QStringList *rc, QString *
{
Q_UNUSED(peExecutableFileName)
rc->clear();
- *errorMessage = QLatin1String("Not implemented.");
+ *errorMessage = "Not implemented.";
return false;
}
diff --git a/src/plugins/debugger/simplifytype.cpp b/src/plugins/debugger/simplifytype.cpp
index a23d819fa63..f8bea299f61 100644
--- a/src/plugins/debugger/simplifytype.cpp
+++ b/src/plugins/debugger/simplifytype.cpp
@@ -45,13 +45,13 @@ namespace Internal {
static QString chopConst(QString type)
{
while (true) {
- if (type.startsWith(QLatin1String("const")))
+ if (type.startsWith("const"))
type = type.mid(5);
- else if (type.startsWith(QLatin1Char(' ')))
+ else if (type.startsWith(' '))
type = type.mid(1);
- else if (type.endsWith(QLatin1String("const")))
+ else if (type.endsWith("const"))
type.chop(5);
- else if (type.endsWith(QLatin1Char(' ')))
+ else if (type.endsWith(' '))
type.chop(1);
else
break;
@@ -61,13 +61,13 @@ static QString chopConst(QString type)
static inline QRegExp stdStringRegExp(const QString &charType)
{
- QString rc = QLatin1String("basic_string<");
+ QString rc = "basic_string<";
rc += charType;
- rc += QLatin1String(",[ ]?std::char_traits<");
+ rc += ",[ ]?std::char_traits<";
rc += charType;
- rc += QLatin1String(">,[ ]?std::allocator<");
+ rc += ">,[ ]?std::allocator<";
rc += charType;
- rc += QLatin1String("> >");
+ rc += "> >";
const QRegExp re(rc);
QTC_ASSERT(re.isValid(), /**/);
return re;
@@ -90,8 +90,8 @@ static inline void simplifyStdString(const QString &charType, const QString &rep
pos = matchPos + replacementSize;
// If we were inside an 'allocator<std::basic_string..char > >'
// kill the following blank -> 'allocator<std::string>'
- if (pos + 1 < type->size() && type->at(pos) == QLatin1Char(' ')
- && type->at(pos + 1) == QLatin1Char('>'))
+ if (pos + 1 < type->size() && type->at(pos) == ' '
+ && type->at(pos + 1) == '>')
type->remove(pos, 1);
}
}
@@ -102,9 +102,9 @@ static inline QString fixNestedTemplates(QString s)
{
const int size = s.size();
if (size > 3
- && s.at(size - 1) == QLatin1Char('>')
- && s.at(size - 2) == QLatin1Char(' ')
- && s.at(size - 3) != QLatin1Char('>'))
+ && s.at(size - 1) == '>'
+ && s.at(size - 2) == ' '
+ && s.at(size - 3) != '>')
s.remove(size - 2, 1);
return s;
}
@@ -112,57 +112,57 @@ static inline QString fixNestedTemplates(QString s)
QString simplifyType(const QString &typeIn)
{
QString type = typeIn;
- if (type.startsWith(QLatin1String("class "))) // MSVC prepends class,struct
+ if (type.startsWith("class ")) // MSVC prepends class,struct
type.remove(0, 6);
- if (type.startsWith(QLatin1String("struct ")))
+ if (type.startsWith("struct "))
type.remove(0, 7);
- type.replace(QLatin1String("short int"), QLatin1String("short"));
+ type.replace("short int", "short");
- const bool isLibCpp = type.contains(QLatin1String("std::__1"));
- type.replace(QLatin1String("std::__cxx11::"), QLatin1String("std::"));
- type.replace(QLatin1String("std::__1::"), QLatin1String("std::"));
- type.replace(QLatin1String("std::__debug::"), QLatin1String("std::"));
- QRegExp simpleStringRE(QString::fromLatin1("std::basic_string<char> ?"));
- type.replace(simpleStringRE, QLatin1String("std::string"));
+ const bool isLibCpp = type.contains("std::__1");
+ type.replace("std::__cxx11::", "std::");
+ type.replace("std::__1::", "std::");
+ type.replace("std::__debug::", "std::");
+ QRegExp simpleStringRE("std::basic_string<char> ?");
+ type.replace(simpleStringRE, "std::string");
// Normalize space + ptr.
- type.replace(QLatin1String(" *"), QLatin1String("@"));
- type.replace(QLatin1Char('*'), QLatin1Char('@'));
+ type.replace(" *", "@");
+ type.replace('*', '@');
// Normalize char const * and const char *.
- type.replace(QLatin1String("char const@"), QLatin1String("const char@"));
+ type.replace("char const@", "const char@");
for (int i = 0; i < 10; ++i) {
// boost::shared_ptr<...>::element_type
- if (type.startsWith(QLatin1String("boost::shared_ptr<"))
- && type.endsWith(QLatin1String(">::element_type")))
+ if (type.startsWith("boost::shared_ptr<")
+ && type.endsWith(">::element_type"))
type = type.mid(18, type.size() - 33);
// std::shared_ptr<...>::element_type
- if (type.startsWith(QLatin1String("std::shared_ptr<"))
- && type.endsWith(QLatin1String(">::element_type")))
+ if (type.startsWith("std::shared_ptr<")
+ && type.endsWith(">::element_type"))
type = type.mid(16, type.size() - 31);
// std::ifstream
- QRegExp ifstreamRE(QLatin1String("std::basic_ifstream<char,\\s*std::char_traits<char>\\s*>"));
+ QRegExp ifstreamRE("std::basic_ifstream<char,\\s*std::char_traits<char>\\s*>");
ifstreamRE.setMinimal(true);
QTC_ASSERT(ifstreamRE.isValid(), return typeIn);
if (ifstreamRE.indexIn(type) != -1)
- type.replace(ifstreamRE.cap(0), QLatin1String("std::ifstream"));
+ type.replace(ifstreamRE.cap(0), "std::ifstream");
// std::__1::hash_node<int, void *>::value_type -> int
if (isLibCpp) {
- //QRegExp hashNodeRE(QLatin1String("std::__hash_node<([^<>]*),\\s*void\\s*@>::value_type"));
- QRegExp hashNodeRE(QLatin1String("std::__hash_node<([^<>]*),\\s*void\\s*@>::value_type"));
+ //QRegExp hashNodeRE("std::__hash_node<([^<>]*),\\s*void\\s*@>::value_type");
+ QRegExp hashNodeRE("std::__hash_node<([^<>]*),\\s*void\\s*@>::value_type");
QTC_ASSERT(hashNodeRE.isValid(), return typeIn);
if (hashNodeRE.indexIn(type) != -1)
type.replace(hashNodeRE.cap(0), hashNodeRE.cap(1));
}
// Anything with a std::allocator
- int start = type.indexOf(QLatin1String("std::allocator<"));
+ int start = type.indexOf("std::allocator<");
if (start != -1) {
// search for matching '>'
int pos;
@@ -182,12 +182,12 @@ QString simplifyType(const QString &typeIn)
const QString allocEsc = QRegExp::escape(alloc);
const QString innerEsc = QRegExp::escape(inner);
- if (inner == QLatin1String("char")) { // std::string
- simplifyStdString(QLatin1String("char"), QLatin1String("string"), &type);
- } else if (inner == QLatin1String("wchar_t")) { // std::wstring
- simplifyStdString(QLatin1String("wchar_t"), QLatin1String("wstring"), &type);
- } else if (inner == QLatin1String("unsigned short")) { // std::wstring/MSVC
- simplifyStdString(QLatin1String("unsigned short"), QLatin1String("wstring"), &type);
+ if (inner == "char") { // std::string
+ simplifyStdString("char", "string", &type);
+ } else if (inner == "wchar_t") { // std::wstring
+ simplifyStdString("wchar_t", "wstring", &type);
+ } else if (inner == "unsigned short") { // std::wstring/MSVC
+ simplifyStdString("unsigned short", "wstring", &type);
}
// std::vector, std::deque, std::list
QRegExp re1(QString::fromLatin1("(vector|list|deque)<%1, ?%2\\s*>").arg(innerEsc, allocEsc));
@@ -233,7 +233,7 @@ QString simplifyType(const QString &typeIn)
type.replace(boostUnorderedSetRE.cap(0), QString::fromLatin1("unordered_set<%1>").arg(inner));
// std::map
- if (inner.startsWith(QLatin1String("std::pair<"))) {
+ if (inner.startsWith("std::pair<")) {
// search for outermost ',', split key and value
int pos;
int level = 0;
@@ -249,7 +249,7 @@ QString simplifyType(const QString &typeIn)
const QString key = chopConst(inner.mid(10, pos - 10));
const QString keyEsc = QRegExp::escape(key);
// Get value: MSVC: 'pair<a const ,b>', gcc: 'pair<const a, b>'
- if (inner.at(++pos) == QLatin1Char(' '))
+ if (inner.at(++pos) == ' ')
pos++;
const QString value = inner.mid(pos, inner.size() - pos - 1).trimmed();
const QString valueEsc = QRegExp::escape(value);
@@ -269,7 +269,7 @@ QString simplifyType(const QString &typeIn)
}
// std::unordered_map
- if (inner.startsWith(QLatin1String("std::pair<"))) {
+ if (inner.startsWith("std::pair<")) {
// search for outermost ',', split key and value
int pos;
int level = 0;
@@ -285,7 +285,7 @@ QString simplifyType(const QString &typeIn)
const QString key = chopConst(inner.mid(10, pos - 10));
const QString keyEsc = QRegExp::escape(key);
// Get value: MSVC: 'pair<a const ,b>', gcc: 'pair<const a, b>'
- if (inner.at(++pos) == QLatin1Char(' '))
+ if (inner.at(++pos) == ' ')
pos++;
const QString value = inner.mid(pos, inner.size() - pos - 1).trimmed();
const QString valueEsc = QRegExp::escape(value);
@@ -308,8 +308,8 @@ QString simplifyType(const QString &typeIn)
}
} // with std::allocator
}
- type.replace(QLatin1Char('@'), QLatin1String(" *"));
- type.replace(QLatin1String(" >"), QLatin1String(">"));
+ type.replace('@', " *");
+ type.replace(" >", ">");
return type;
}
diff --git a/src/plugins/debugger/sourceagent.cpp b/src/plugins/debugger/sourceagent.cpp
index d133081b461..074806c5bb0 100644
--- a/src/plugins/debugger/sourceagent.cpp
+++ b/src/plugins/debugger/sourceagent.cpp
@@ -68,7 +68,7 @@ public:
};
SourceAgentPrivate::SourceAgentPrivate()
- : producer(QLatin1String("remote"))
+ : producer("remote")
{
}
@@ -103,7 +103,7 @@ void SourceAgent::setContent(const QString &filePath, const QString &content)
d->path = filePath;
if (!d->editor) {
- QString titlePattern = d->producer + QLatin1String(": ")
+ QString titlePattern = d->producer + ": "
+ Utils::FileName::fromString(filePath).fileName();
d->editor = qobject_cast<BaseTextEditor *>(
EditorManager::openEditorWithContents(
diff --git a/src/plugins/debugger/sourcefileshandler.cpp b/src/plugins/debugger/sourcefileshandler.cpp
index 3de9b483607..f99372fb646 100644
--- a/src/plugins/debugger/sourcefileshandler.cpp
+++ b/src/plugins/debugger/sourcefileshandler.cpp
@@ -67,8 +67,8 @@ QVariant SourceFilesHandler::headerData(int section,
{
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
static QString headers[] = {
- tr("Internal Name") + QLatin1String(" "),
- tr("Full Name") + QLatin1String(" "),
+ tr("Internal Name") + " ",
+ tr("Full Name") + " ",
};
return headers[section];
}
diff --git a/src/plugins/debugger/sourceutils.cpp b/src/plugins/debugger/sourceutils.cpp
index dc42a69296a..b1c254038ac 100644
--- a/src/plugins/debugger/sourceutils.cpp
+++ b/src/plugins/debugger/sourceutils.cpp
@@ -263,7 +263,7 @@ QString cppExpressionAt(TextEditorWidget *editorWidget, int pos,
if (expr.isEmpty()) {
tc.setPosition(pos);
const QChar ch = editorWidget->characterAt(pos);
- if (ch.isLetterOrNumber() || ch == QLatin1Char('_'))
+ if (ch.isLetterOrNumber() || ch == '_')
tc.movePosition(QTextCursor::EndOfWord);
// Fetch the expression's code.
@@ -324,7 +324,7 @@ ContextData getLocationContext(TextDocument *document, int lineNumber)
QString fileName = document->property(Constants::DISASSEMBLER_SOURCE_FILE).toString();
if (!fileName.isEmpty()) {
// Possibly one of the "27 [1] foo = x" lines
- int pos = line.indexOf(QLatin1Char('['));
+ int pos = line.indexOf('[');
int ln = line.leftRef(pos - 1).toInt();
if (ln > 0) {
data.type = LocationByFile;
diff --git a/src/plugins/debugger/stackframe.cpp b/src/plugins/debugger/stackframe.cpp
index 9a2707b19b8..d5a52bc4c38 100644
--- a/src/plugins/debugger/stackframe.cpp
+++ b/src/plugins/debugger/stackframe.cpp
@@ -98,8 +98,8 @@ StackFrame StackFrame::parseFrame(const GdbMi &frameMi, const DebuggerRunParamet
frame.address = frameMi["address"].toAddress();
frame.context = frameMi["context"].data();
if (frameMi["language"].data() == "js"
- || frame.file.endsWith(QLatin1String(".js"))
- || frame.file.endsWith(QLatin1String(".qml"))) {
+ || frame.file.endsWith(".js")
+ || frame.file.endsWith(".qml")) {
frame.language = QmlLanguage;
frame.fixQrcFrame(rp);
}
@@ -151,9 +151,8 @@ QString StackFrame::toToolTip() const
showDistributionNote = true;
}
if (!Utils::HostOsInfo::isWindowsHost() && showDistributionNote) {
- str << QLatin1Char(' ') <<
- tr("Note that most distributions ship debug information "
- "in separate packages.");
+ str << ' ' << tr("Note that most distributions ship debug information "
+ "in separate packages.");
}
str << "</body></html>";
@@ -185,11 +184,11 @@ void StackFrame::fixQrcFrame(const DebuggerRunParameters &rp)
usable = aFi.isFile();
return;
}
- if (!file.startsWith(QLatin1String("qrc:/")))
+ if (!file.startsWith("qrc:/"))
return;
QString relativeFile = file.right(file.size() - 5);
- while (relativeFile.startsWith(QLatin1Char('/')))
+ while (relativeFile.startsWith('/'))
relativeFile = relativeFile.mid(1);
QString absFile = findFile(rp.projectSourceDirectory.toString(), relativeFile);
diff --git a/src/plugins/debugger/threadshandler.cpp b/src/plugins/debugger/threadshandler.cpp
index 4478da8a70e..205790eb401 100644
--- a/src/plugins/debugger/threadshandler.cpp
+++ b/src/plugins/debugger/threadshandler.cpp
@@ -130,14 +130,14 @@ QVariant ThreadItem::threadPart(int column) const
? QString::number(threadData.lineNumber) : QString();
case ThreadData::AddressColumn:
return threadData.address > 0
- ? QLatin1String("0x") + QString::number(threadData.address, 16)
+ ? "0x" + QString::number(threadData.address, 16)
: QString();
case ThreadData::CoreColumn:
return threadData.core;
case ThreadData::StateColumn:
return threadData.state;
case ThreadData::TargetIdColumn:
- if (threadData.targetId.startsWith(QLatin1String("Thread ")))
+ if (threadData.targetId.startsWith("Thread "))
return threadData.targetId.mid(7);
return threadData.targetId;
case ThreadData::NameColumn:
@@ -215,9 +215,9 @@ void ThreadItem::mergeThreadData(const ThreadData &other)
ThreadsHandler::ThreadsHandler(DebuggerEngine *engine)
: m_engine(engine)
{
- setObjectName(QLatin1String("ThreadsModel"));
+ setObjectName("ThreadsModel");
setHeader({
- QLatin1String(" ") + tr("ID") + QLatin1String(" "),
+ " " + tr("ID") + " ",
tr("Address"), tr("Function"), tr("File"), tr("Line"), tr("State"),
tr("Name"), tr("Target ID"), tr("Details"), tr("Core"),
});
diff --git a/src/plugins/debugger/unstartedappwatcherdialog.cpp b/src/plugins/debugger/unstartedappwatcherdialog.cpp
index 703c1ea5ba1..80c2cc85d28 100644
--- a/src/plugins/debugger/unstartedappwatcherdialog.cpp
+++ b/src/plugins/debugger/unstartedappwatcherdialog.cpp
@@ -105,7 +105,7 @@ UnstartedAppWatcherDialog::UnstartedAppWatcherDialog(QWidget *parent)
auto pathLayout = new QHBoxLayout;
m_pathChooser = new Utils::PathChooser(this);
m_pathChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
- m_pathChooser->setHistoryCompleter(QLatin1String("LocalExecutable"), true);
+ m_pathChooser->setHistoryCompleter("LocalExecutable", true);
m_pathChooser->setMinimumWidth(400);
auto resetExecutable = new QPushButton(tr("Reset"));
diff --git a/src/plugins/debugger/watchdata.cpp b/src/plugins/debugger/watchdata.cpp
index 1204b9a2f23..c37e9d46a2b 100644
--- a/src/plugins/debugger/watchdata.cpp
+++ b/src/plugins/debugger/watchdata.cpp
@@ -137,7 +137,7 @@ void WatchItem::setError(const QString &msg)
void WatchItem::setValue(const QString &value0)
{
value = value0;
- if (value == QLatin1String("{...}")) {
+ if (value == "{...}") {
value.clear();
wantsChildren = true; // at least one...
}
@@ -148,7 +148,7 @@ QString WatchItem::toString() const
const char *doubleQuoteComma = "\",";
QString res;
QTextStream str(&res);
- str << QLatin1Char('{');
+ str << '{';
if (!iname.isEmpty())
str << "iname=\"" << iname << doubleQuoteComma;
if (!name.isEmpty() && name != iname)
@@ -180,9 +180,9 @@ QString WatchItem::toString() const
str << "wantsChildren=\"" << (wantsChildren ? "true" : "false") << doubleQuoteComma;
str.flush();
- if (res.endsWith(QLatin1Char(',')))
+ if (res.endsWith(','))
res.truncate(res.size() - 1);
- return res + QLatin1Char('}');
+ return res + '}';
}
QString WatchItem::msgNotInScope()
@@ -468,7 +468,7 @@ void WatchItem::parse(const GdbMi &data, bool maySort)
static void formatToolTipRow(QTextStream &str, const QString &category, const QString &value)
{
QString val = value.toHtmlEscaped();
- val.replace(QLatin1Char('\n'), QLatin1String("<br>"));
+ val.replace('\n', "<br>");
str << "<tr><td>" << category << "</td><td>";
if (!category.isEmpty())
str << ':';
@@ -494,7 +494,7 @@ QString WatchItem::toToolTip() const
QString val = value;
if (val.size() > 1000) {
val.truncate(1000);
- val += QLatin1Char(' ');
+ val += ' ';
val += tr("... <cut off>");
}
formatToolTipRow(str, tr("Value"), val);
diff --git a/src/plugins/debugger/watchdelegatewidgets.cpp b/src/plugins/debugger/watchdelegatewidgets.cpp
index 4a6d9bbba40..efd2dca0649 100644
--- a/src/plugins/debugger/watchdelegatewidgets.cpp
+++ b/src/plugins/debugger/watchdelegatewidgets.cpp
@@ -109,14 +109,14 @@ QValidator::State IntegerValidator::validateEntry(const QString &s, int base, bo
return QValidator::Intermediate;
int pos = 0;
// Skip sign.
- if (signedV && s.at(pos) == QLatin1Char('-')) {
+ if (signedV && s.at(pos) == '-') {
pos++;
if (pos == size)
return QValidator::Intermediate;
}
// Hexadecimal: '0x'?
if (base == 16 && pos + 2 <= size
- && s.at(pos) == QLatin1Char('0') && s.at(pos + 1) == QLatin1Char('x')) {
+ && s.at(pos) == '0' && s.at(pos + 1) == 'x') {
pos+= 2;
if (pos == size)
return QValidator::Intermediate;
@@ -236,7 +236,7 @@ void IntegerWatchLineEdit::setModelData(const QVariant &v)
default:
qWarning("Invalid value (%s) passed to IntegerLineEdit::setModelData",
v.typeName());
- setText(QString(QLatin1Char('0')));
+ setText(QString('0'));
break;
}
if (debug)
@@ -303,7 +303,7 @@ WatchLineEdit *WatchLineEdit::create(QVariant::Type t, QWidget *parent)
BooleanComboBox::BooleanComboBox(QWidget *parent) : QComboBox(parent)
{
QStringList items;
- items << QLatin1String("false") << QLatin1String("true");
+ items << "false" << "true";
addItems(items);
}
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index 81ffc9174d5..3826e33a9f2 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -652,7 +652,7 @@ static QString reformatCharacter(int code, int size, bool isSigned)
if (code < 0)
out += QString("/%1 ").arg((1ULL << (8*size)) + code).left(2 + 2 * size);
else
- out += QString(2 + 2 * size, QLatin1Char(' '));
+ out += QString(2 + 2 * size, ' ');
} else {
out += QString::number(unsigned(code));
}
@@ -2193,7 +2193,7 @@ void WatchHandler::watchExpression(const QString &exp, const QString &name, bool
saveWatchers();
if (m_model->m_engine->state() == DebuggerNotReady) {
- item->setValue(QString(QLatin1Char(' ')));
+ item->setValue(" ");
item->update();
} else {
m_model->m_engine->updateWatchData(item->iname);
@@ -2216,7 +2216,7 @@ void WatchHandler::updateWatchExpression(WatchItem *item, const QString &newExp)
saveWatchers();
if (m_model->m_engine->state() == DebuggerNotReady) {
- item->setValue(QString(QLatin1Char(' ')));
+ item->setValue(" ");
item->update();
} else {
m_model->m_engine->updateWatchData(item->iname);
@@ -2622,7 +2622,7 @@ QString WatchModel::editorContents(const QModelIndexList &list)
QTextStream ts(&contents);
forAllItems([&ts, this, list](WatchItem *item) {
if (list.isEmpty() || list.contains(indexForItem(item))) {
- const QChar tab = QLatin1Char('\t');
+ const QChar tab = '\t';
const QChar nl = '\n';
ts << QString(item->level(), tab) << item->name << tab << displayValue(item) << tab
<< item->type << nl;