Commit 6431ab2c authored by hjk's avatar hjk Committed by Eike Ziller

Use Qt 5's QStringList::join(QChar)

Less typing and less cycles than join(QString) where appropriate

Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 2b5df11c
......@@ -452,7 +452,7 @@ int main(int argc, char **argv)
}
}
if (!coreplugin) {
QString nativePaths = QDir::toNativeSeparators(pluginPaths.join(QLatin1String(",")));
QString nativePaths = QDir::toNativeSeparators(pluginPaths.join(QLatin1Char(',')));
const QString reason = QCoreApplication::translate("Application", "Could not find 'Core.pluginspec' in %1").arg(nativePaths);
displayError(msgCoreLoadFailure(reason));
return 1;
......
......@@ -517,7 +517,7 @@ QString PluginManager::serializedArguments()
rc += QLatin1Char(':');
rc += ps->name();
rc += separator;
rc += ps->arguments().join(QString(separator));
rc += ps->arguments().join(separator);
}
}
if (!d->arguments.isEmpty()) {
......
......@@ -465,7 +465,7 @@ void DeclarativeToolsClient::createQmlObject(const QString &qmlText,
log(LogSend, cmd, QString::fromLatin1("%1 %2 [%3] %4").arg(qmlText,
QString::number(parentDebugId),
imports.join(QLatin1String(",")), filename));
imports.join(QLatin1Char(',')), filename));
sendMessage(message);
}
......
......@@ -112,7 +112,7 @@ void QmlToolsClient::messageReceived(const QByteArray &message)
}
}
log(LogReceive, type + ':' + event,
QString::fromLatin1("[%1]").arg(debugIdStrings.join(QLatin1String(","))));
QString::fromLatin1("[%1]").arg(debugIdStrings.join(QLatin1Char(','))));
emit currentObjectsChanged(m_currentDebugIds);
}
} else {
......@@ -277,7 +277,7 @@ void QmlToolsClient::createQmlObject(const QString &qmlText,
log(LogSend, CREATE_OBJECT, QString::fromLatin1("%1 %2 [%3] %4").arg(qmlText,
QString::number(parentDebugId),
imports.join(QLatin1String(",")), filename));
imports.join(QLatin1Char(',')), filename));
sendMessage(message);
}
......
......@@ -303,7 +303,7 @@ void CompletionContextFinder::checkImport()
YY_RESTORE();
if (m_inImport && isInLibVersionImport == 1) {
m_libVersion = libVersionImport.join(QLatin1String(""));
m_libVersion = libVersionImport.join(QString());
if (m_libVersion.isNull())
m_libVersion = QLatin1String("");
} else {
......
......@@ -481,10 +481,10 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)
--iPath;
if (safeName.indexIn(myPath.at(iPath)) != 0)
break;
ImportKey iKey(ImportType::Library, QStringList(myPath.mid(iPath)).join(QLatin1String(".")),
ImportKey iKey(ImportType::Library, QStringList(myPath.mid(iPath)).join(QLatin1Char('.')),
importKey.majorVersion, importKey.minorVersion);
cImport.possibleExports.append(Export(iKey, (iPath == 1) ? QLatin1String("/") :
QStringList(myPath.mid(0, iPath)).join(QLatin1String("/")), true));
QStringList(myPath.mid(0, iPath)).join(QLatin1Char('/')), true));
}
} else {
QString requiredPath = QStringList(splitPath.mid(0, splitPath.size() - importKey.splitPath.size()))
......@@ -512,10 +512,10 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)
--iPath;
if (safeName.indexIn(splitPath.at(iPath)) != 0)
break;
ImportKey iKey(ImportType::Library, QStringList(splitPath.mid(iPath)).join(QLatin1String(".")),
ImportKey iKey(ImportType::Library, QStringList(splitPath.mid(iPath)).join(QLatin1Char('.')),
majorVersion, minorVersion);
cImport.possibleExports.append(Export(iKey, (iPath == 1) ? QLatin1String("/") :
QStringList(splitPath.mid(0, iPath)).join(QLatin1String("/")), true));
QStringList(splitPath.mid(0, iPath)).join(QLatin1Char('/')), true));
}
}
foreach (const QmlDirParser::Component &component, info.components()) {
......
......@@ -200,7 +200,7 @@ ImportKey ImportKey::flatKey() const {
QString ImportKey::libraryQualifiedPath() const
{
QString res = splitPath.join(QString::fromLatin1("."));
QString res = splitPath.join(QLatin1Char('.'));
if (res.isEmpty() && !splitPath.isEmpty())
return QLatin1String("");
return res;
......@@ -208,7 +208,7 @@ QString ImportKey::libraryQualifiedPath() const
QString ImportKey::path() const
{
QString res = splitPath.join(QString::fromLatin1("/"));
QString res = splitPath.join(QLatin1Char('/'));
if (res.isEmpty() && !splitPath.isEmpty())
return QLatin1String("/");
return res;
......@@ -442,7 +442,7 @@ QString ImportKey::toString() const
res = path();
break;
case ImportType::Library:
res = splitPath.join(QLatin1String("."));
res = splitPath.join(QLatin1Char('.'));
break;
}
......
......@@ -431,7 +431,7 @@ Import LinkPrivate::importNonFile(Document::Ptr doc, const ImportInfo &importInf
"%1\n\n"
"For qmake projects, use the QML_IMPORT_PATH variable to add import paths.\n"
"For qmlproject projects, use the importPaths property to add import paths.").arg(
importPaths.join(QLatin1String("\n"))));
importPaths.join(QLatin1Char('\n'))));
}
return import;
......
......@@ -241,7 +241,7 @@ static QString qmldumpErrorMessage(const QString &libraryPath, const QString &er
static QString qmldumpFailedMessage(const QString &libraryPath, const QString &error)
{
QString firstLines =
QStringList(error.split(QLatin1Char('\n')).mid(0, 10)).join(QLatin1String("\n"));
QStringList(error.split(QLatin1Char('\n')).mid(0, 10)).join(QLatin1Char('\n'));
return noTypeinfoError(libraryPath) + QLatin1String("\n\n") +
PluginDumper::tr("Automatic type dump of QML module failed.\n"
"First 10 lines or errors:\n"
......@@ -412,9 +412,9 @@ void PluginDumper::loadQmltypesFile(const QStringList &qmltypesFilePaths,
if (errors.isEmpty()) {
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::TypeInfoFileDone);
} else {
printParseWarnings(libraryPath, errors.join(QLatin1String("\n")));
printParseWarnings(libraryPath, errors.join(QLatin1Char('\n')));
errors.prepend(tr("Errors while reading typeinfo files:"));
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::TypeInfoFileError, errors.join(QLatin1String("\n")));
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::TypeInfoFileError, errors.join(QLatin1Char('\n')));
}
if (!warnings.isEmpty())
......
......@@ -301,7 +301,7 @@ protected:
continue;
// the extra space is to avoid // comments sticking to the 0 offset
QString indentLine = newContext.join(QLatin1String("\n")) + QLatin1String("\n ") + restLine;
QString indentLine = newContext.join(QLatin1Char('\n')) + QLatin1String("\n ") + restLine;
int indent = tryIndent(indentLine);
QList<Split> newSplits = possibleSplits.mid(i + 1);
......
......@@ -235,7 +235,7 @@ static bool runBuildProcess(QProcess &proc,
QString cmd = binary.toString();
if (!args.isEmpty()) {
cmd += QLatin1Char(' ');
cmd += args.join(QString(QLatin1Char(' ')));
cmd += args.join(QLatin1Char(' '));
}
*errorMessage =
QCoreApplication::translate("ProjectExplorer::BuildableHelperLibrary",
......@@ -287,7 +287,7 @@ bool BuildableHelperLibrary::buildHelper(const BuildHelperArguments &arguments,
log->append(newline);
log->append(QCoreApplication::translate("ProjectExplorer::BuildableHelperLibrary",
"Running %1 %2 ...\n").arg(arguments.qmakeCommand.toUserOutput(),
qmakeArgs.join(QLatin1String(" "))));
qmakeArgs.join(QLatin1Char(' '))));
if (!runBuildProcess(proc, arguments.qmakeCommand, qmakeArgs, 30000, false, log, errorMessage))
return false;
......@@ -299,7 +299,7 @@ bool BuildableHelperLibrary::buildHelper(const BuildHelperArguments &arguments,
}
log->append(QCoreApplication::translate("ProjectExplorer::BuildableHelperLibrary",
"Running %1 %2 ...\n")
.arg(makeFullPath.toUserOutput(), arguments.makeArguments.join(QLatin1String(" "))));
.arg(makeFullPath.toUserOutput(), arguments.makeArguments.join(QLatin1Char(' '))));
if (!runBuildProcess(proc, makeFullPath, arguments.makeArguments, 120000, false, log, errorMessage))
return false;
return true;
......
......@@ -202,7 +202,7 @@ QStringList PathListEditor::pathList() const
void PathListEditor::setPathList(const QStringList &l)
{
d->edit->setPlainText(l.join(QString(QLatin1Char('\n'))));
d->edit->setPlainText(l.join(QLatin1Char('\n')));
}
void PathListEditor::setPathList(const QString &pathString)
......
......@@ -539,7 +539,7 @@ AndroidConfig::CreateAvdInfo AndroidConfig::createAVDImpl(CreateAvdInfo info, Ut
proc.start(androidToolPath.toString(), arguments);
if (!proc.waitForStarted()) {
info.error = QApplication::translate("AndroidConfig", "Could not start process \"%1 %2\"")
.arg(androidToolPath.toString(), arguments.join(QLatin1String(" ")));
.arg(androidToolPath.toString(), arguments.join(QLatin1Char(' ')));
return info;
}
......
......@@ -328,18 +328,18 @@ void AndroidDeployQtStep::run(QFutureInterface<bool> &fi)
void AndroidDeployQtStep::runCommand(const QString &program, const QStringList &arguments)
{
QProcess buildProc;
emit addOutput(tr("Package deploy: Running command \"%1 %2\".").arg(program).arg(arguments.join(QLatin1String(" "))), BuildStep::MessageOutput);
emit addOutput(tr("Package deploy: Running command \"%1 %2\".").arg(program).arg(arguments.join(QLatin1Char(' '))), BuildStep::MessageOutput);
buildProc.start(program, arguments);
if (!buildProc.waitForStarted()) {
emit addOutput(tr("Packaging error: Could not start command \"%1 %2\". Reason: %3")
.arg(program).arg(arguments.join(QLatin1String(" "))).arg(buildProc.errorString()), BuildStep::ErrorMessageOutput);
.arg(program).arg(arguments.join(QLatin1Char(' '))).arg(buildProc.errorString()), BuildStep::ErrorMessageOutput);
return;
}
if (!buildProc.waitForFinished(2 * 60 * 1000)
|| buildProc.error() != QProcess::UnknownError
|| buildProc.exitCode() != 0) {
QString mainMessage = tr("Packaging Error: Command \"%1 %2\" failed.")
.arg(program).arg(arguments.join(QLatin1String(" ")));
.arg(program).arg(arguments.join(QLatin1Char(' ')));
if (buildProc.error() != QProcess::UnknownError)
mainMessage += QLatin1Char(' ') + tr("Reason: %1").arg(buildProc.errorString());
else
......
......@@ -183,7 +183,7 @@ public:
QString lineText;
if (node->incompatibleReason().isEmpty()) {
lineText = AndroidManager::androidNameForApiLevel(device.sdk) + QLatin1String(" ");
lineText += AndroidDeviceDialog::tr("ABI:") + device.cpuAbi.join(QLatin1String(" "));
lineText += AndroidDeviceDialog::tr("ABI:") + device.cpuAbi.join(QLatin1Char(' '));
} else {
lineText = node->incompatibleReason();
}
......@@ -342,7 +342,7 @@ void AndroidDeviceModel::setDevices(const QVector<AndroidDeviceInfo> &devices)
.arg(device.serialNumber);
} else if (!device.cpuAbi.contains(m_abi)) {
error = AndroidDeviceDialog::tr("ABI is incompatible, device supports ABIs: %1.")
.arg(device.cpuAbi.join(QLatin1String(" ")));
.arg(device.cpuAbi.join(QLatin1Char(' ')));
} else if (device.sdk < m_apiLevel) {
error = AndroidDeviceDialog::tr("API Level of device is: %1.")
.arg(device.sdk);
......
......@@ -416,7 +416,7 @@ static QString loadLocal(ProjectExplorer::Target *target, int apiLevel, ItemType
// The next loop requires all library names to end with a ":" so we append one
// to the end after joining.
localLibs = dependencyLibs.join(QLatin1String(":")) + QLatin1Char(':');
localLibs = dependencyLibs.join(QLatin1Char(':')) + QLatin1Char(':');
foreach (QString replacedLib, replacedLibs)
localLibs.remove(replacedLib + QLatin1Char(':'));
......@@ -486,7 +486,7 @@ void AndroidManager::cleanLibsOnDevice(ProjectExplorer::Target *target)
arguments << QLatin1String("shell") << QLatin1String("rm") << QLatin1String("-r") << QLatin1String("/data/local/tmp/qt");
process->connect(process, SIGNAL(finished(int)), process, SLOT(deleteLater()));
const QString adb = AndroidConfigurations::currentConfig().adbToolPath().toString();
Core::MessageManager::write(adb + QLatin1Char(' ') + arguments.join(QLatin1String(" ")));
Core::MessageManager::write(adb + QLatin1Char(' ') + arguments.join(QLatin1Char(' ')));
process->start(adb, arguments);
if (!process->waitForStarted(500))
delete process;
......@@ -516,7 +516,7 @@ void AndroidManager::installQASIPackage(ProjectExplorer::Target *target, const Q
process->connect(process, SIGNAL(finished(int)), process, SLOT(deleteLater()));
const QString adb = AndroidConfigurations::currentConfig().adbToolPath().toString();
Core::MessageManager::write(adb + QLatin1Char(' ') + arguments.join(QLatin1String(" ")));
Core::MessageManager::write(adb + QLatin1Char(' ') + arguments.join(QLatin1Char(' ')));
process->start(adb, arguments);
if (!process->waitForFinished(500))
delete process;
......
......@@ -207,7 +207,7 @@ void ArtisticStyleSettings::createDocumentationFile() const
const QString text = QLatin1String("<p><span class=\"option\">")
+ keys.filter(QRegExp(QLatin1String("^\\-"))).join(QLatin1String(", "))
+ QLatin1String("</span></p><p>")
+ Qt::escape(docu.join(QLatin1String(" ")))
+ Qt::escape(docu.join(QLatin1Char(' ')))
+ QLatin1String("</p>");
stream.writeTextElement(QLatin1String(Constants::DOCUMENTATION_XMLDOC), text);
stream.writeEndElement();
......
......@@ -66,7 +66,7 @@ void ConfigurationSyntaxHighlighter::setKeywords(const QStringList &keywords)
pattern << QRegExp::escape(word);
}
m_expressionKeyword.setPattern(QLatin1String("(?:\\s|^)(") + pattern.join(QLatin1String("|"))
m_expressionKeyword.setPattern(QLatin1String("(?:\\s|^)(") + pattern.join(QLatin1Char('|'))
+ QLatin1String(")(?=\\s|\\:|\\=|\\,|$)"));
}
......
......@@ -153,7 +153,7 @@ void UncrustifySettings::createDocumentationFile() const
const QString text = QLatin1String("<p><span class=\"option\">") + keyword
+ QLatin1String("</span> <span class=\"param\">") + options
+ QLatin1String("</span></p><p>")
+ Qt::escape(docu.join(QLatin1String(" ")))
+ Qt::escape(docu.join(QLatin1Char(' ')))
+ QLatin1String("</p>");
stream.writeStartElement(QLatin1String(Constants::DOCUMENTATION_XMLENTRY));
stream.writeTextElement(QLatin1String(Constants::DOCUMENTATION_XMLKEY), keyword);
......
......@@ -95,7 +95,7 @@ static QString commandLine(const QStringList &options, const QString &fileName)
foreach (const QString &option, allOptions)
allOptionsQuoted.append(QLatin1Char('\'') + option + QLatin1Char('\''));
return ::Utils::HostOsInfo::withExecutableSuffix(QLatin1String("clang"))
+ QLatin1Char(' ') + allOptionsQuoted.join(QLatin1String(" "));
+ QLatin1Char(' ') + allOptionsQuoted.join(QLatin1Char(' '));
}
void CreateMarkers::run()
......
......@@ -113,7 +113,7 @@ void PchManager::setPCHInfo(const QList<ProjectPart::Ptr> &projectParts,
pchInfo->fileName()), Core::MessageManager::Silent);
}
if (!msgs.second.isEmpty())
emit pchMessage(msgs.second.join(QLatin1String("\n")), Core::MessageManager::Flash);
emit pchMessage(msgs.second.join(QLatin1Char('\n')), Core::MessageManager::Flash);
}
}
......
......@@ -302,7 +302,7 @@ void ClangCodeModelPlugin::test_ObjC_hints()
QVERIFY2(hint == ccr.hint(), hintError.arg(ccr.hint()).toAscii());
}
const QString textError(QString::fromLatin1("Text \"%1\" not found in set %2")
.arg(text).arg(texts.join(QLatin1String(","))));
.arg(text).arg(texts.join(QLatin1Char(','))));
QVERIFY2(hasText, textError.toAscii());
}
}
......
......@@ -98,7 +98,7 @@ bool VersionSelector::readValues()
break;
messageLines << line;
} while (!m_stream->atEnd());
m_message = messageLines.join(QLatin1String(" "));
m_message = messageLines.join(QLatin1Char(' '));
return true;
}
......
......@@ -416,7 +416,7 @@ void NewDialog::currentItemChanged(const QModelIndex &index)
else
desciption += tr("Supported Platforms")
+ QLatin1String("</b>: <tt>")
+ displayNamesForSupportedPlatforms.join(QLatin1String(" "))
+ displayNamesForSupportedPlatforms.join(QLatin1Char(' '))
+ QLatin1String("</tt>");
m_ui->templateDescription->setHtml(desciption);
......
......@@ -234,7 +234,7 @@ void ReadOnlyFilesDialog::promptFailWarning(const QStringList &files, ReadOnlyRe
message = d->failWarning;
message += QLatin1Char('\n');
message += tr("See details for a complete list of files.");
details = files.join(QLatin1String("\n"));
details = files.join(QLatin1Char('\n'));
}
QMessageBox msgBox(QMessageBox::Warning, title, message,
QMessageBox::Ok, ICore::dialogParent());
......
......@@ -1113,7 +1113,7 @@ void DocumentManager::checkForReload()
}
if (!errorStrings.isEmpty())
QMessageBox::critical(ICore::dialogParent(), tr("File Error"),
errorStrings.join(QLatin1String("\n")));
errorStrings.join(QLatin1Char('\n')));
// handle deleted files
EditorManager::closeDocuments(documentsToClose, false);
......
......@@ -1531,7 +1531,7 @@ void EditorManagerPrivate::autoSave()
}
if (!errors.isEmpty())
QMessageBox::critical(ICore::mainWindow(), tr("File Error"),
errors.join(QLatin1String("\n")));
errors.join(QLatin1Char('\n')));
}
void EditorManagerPrivate::handleContextChange(const QList<IContext *> &context)
......
......@@ -224,7 +224,7 @@ void GeneralSettings::updatePath()
{
Environment env = Environment::systemEnvironment();
QStringList toAdd = VcsManager::additionalToolsPath();
env.appendOrSetPath(toAdd.join(QString(HostOsInfo::pathListSeparator())));
env.appendOrSetPath(toAdd.join(HostOsInfo::pathListSeparator()));
m_page->patchChooser->setEnvironment(env);
}
......
......@@ -105,7 +105,7 @@ bool DirectoryFilter::openConfigDialog(QWidget *parent, bool &needsRefresh)
m_ui.nameEdit->selectAll();
m_ui.directoryList->clear();
m_ui.directoryList->addItems(m_directories);
m_ui.fileTypeEdit->setText(m_filters.join(QString(QLatin1Char(','))));
m_ui.fileTypeEdit->setText(m_filters.join(QLatin1Char(',')));
m_ui.shortcutEdit->setText(shortcutString());
m_ui.defaultFlag->setChecked(!isIncludedByDefault());
updateOptionButtons();
......
......@@ -619,7 +619,7 @@ void MimeTypeData::assignSuffixes(const QStringList &patterns)
void MimeTypeData::debug(QTextStream &str, int indent) const
{
const QString indentS = QString(indent, QLatin1Char(' '));
const QString comma = QString(1, QLatin1Char(','));
const QLatin1Char comma(',');
str << indentS << "Type: " << type;
if (!aliases.empty())
str << " Aliases: " << aliases.join(comma);
......@@ -779,7 +779,7 @@ bool MimeType::setPreferredSuffix(const QString &s)
qWarning("%s: Attempt to set preferred suffix to '%s', which is not in the list of suffixes: %s.",
m_d->type.toUtf8().constData(),
s.toUtf8().constData(),
m_d->suffixes.join(QLatin1String(",")).toUtf8().constData());
m_d->suffixes.join(QLatin1Char(',')).toUtf8().constData());
return false;
}
m_d->preferredSuffix = s;
......@@ -1280,7 +1280,6 @@ public:
typedef QHash<QString, QString> AliasMap;
typedef QMultiHash<QString, QString> ParentChildrenMap;
static const QChar kSemiColon;
static const QString kModifiedMimeTypesFile;
static QString kModifiedMimeTypesPath;
......@@ -1299,7 +1298,6 @@ public:
QMutex m_mutex;
};
const QChar MimeDatabasePrivate::kSemiColon(QLatin1Char(';'));
const QString MimeDatabasePrivate::kModifiedMimeTypesFile(QLatin1String("modifiedmimetypes.xml"));
QString MimeDatabasePrivate::kModifiedMimeTypesPath;
......@@ -1691,7 +1689,7 @@ QList<MimeType> MimeDatabasePrivate::readUserModifiedMimeTypes()
if (reader.name() == QLatin1String(mimeTypeTagC)) {
mimeType.setType(atts.value(mimeTypeAttribute).toString());
const QString &patterns = atts.value(patternAttribute).toString();
mimeType.setGlobPatterns(toGlobPatterns(patterns.split(kSemiColon)));
mimeType.setGlobPatterns(toGlobPatterns(patterns.split(QLatin1Char(';'))));
} else if (reader.name() == QLatin1String(matchTagC)) {
const QString &value = atts.value(matchValueAttribute).toString();
const QStringRef type = atts.value(matchTypeAttribute);
......@@ -1762,7 +1760,7 @@ void MimeDatabasePrivate::writeUserModifiedMimeTypes(const QList<MimeType> &mime
writer.writeStartElement(mimeTypeTag);
writer.writeAttribute(mimeTypeAttribute, mimeType.type());
writer.writeAttribute(patternAttribute,
fromGlobPatterns(mimeType.globPatterns()).join(kSemiColon));
fromGlobPatterns(mimeType.globPatterns()).join(QLatin1Char(';')));
const QList<QSharedPointer<IMagicMatcher> > &matchers = mimeType.magicMatchers();
foreach (const QSharedPointer<IMagicMatcher> &matcher, matchers) {
// Only care about rule-based matchers.
......
......@@ -153,7 +153,7 @@ QString Utils::toString(const QList<ProjectFile> &projectFiles)
foreach (const ProjectFile &projectFile, projectFiles)
filesList << QDir::toNativeSeparators(projectFile.path);
::Utils::sort(filesList);
return filesList.join(QLatin1String("\n"));
return filesList.join(QLatin1Char('\n'));
}
QString Utils::toString(ProjectFile::Kind kind)
......@@ -412,7 +412,7 @@ QString Utils::pathListToString(const QStringList &pathList)
QStringList result;
foreach (const QString &path, pathList)
result << QDir::toNativeSeparators(path);
return result.join(QLatin1String("\n"));
return result.join(QLatin1Char('\n'));
}
QString Utils::pathListToString(const ProjectPart::HeaderPaths &pathList)
......@@ -424,7 +424,7 @@ QString Utils::pathListToString(const ProjectPart::HeaderPaths &pathList)
path.isFrameworkPath() ? QLatin1String("framework") : QLatin1String("include")
);
}
return result.join(QLatin1String("\n"));
return result.join(QLatin1Char('\n'));
}
QList<CPlusPlus::Document::Ptr> Utils::snapshotToList(const CPlusPlus::Snapshot &snapshot)
......
......@@ -311,13 +311,14 @@ static inline void setComboText(QComboBox *cb, const QString &text, int defaultI
void CppFileSettingsWidget::setSettings(const CppFileSettings &s)
{
const QChar comma = QLatin1Char(',');
m_ui->lowerCaseFileNamesCheckBox->setChecked(s.lowerCaseFiles);
m_ui->headerPrefixesEdit->setText(s.headerPrefixes.join(QLatin1String(",")));
m_ui->sourcePrefixesEdit->setText(s.sourcePrefixes.join(QLatin1String(",")));
m_ui->headerPrefixesEdit->setText(s.headerPrefixes.join(comma));
m_ui->sourcePrefixesEdit->setText(s.sourcePrefixes.join(comma));
setComboText(m_ui->headerSuffixComboBox, s.headerSuffix);
setComboText(m_ui->sourceSuffixComboBox, s.sourceSuffix);
m_ui->headerSearchPathsEdit->setText(s.headerSearchPaths.join(QLatin1String(",")));
m_ui->sourceSearchPathsEdit->setText(s.sourceSearchPaths.join(QLatin1String(",")));
m_ui->headerSearchPathsEdit->setText(s.headerSearchPaths.join(comma));
m_ui->sourceSearchPathsEdit->setText(s.sourceSearchPaths.join(comma));
setLicenseTemplatePath(s.licenseTemplatePath);
}
......
......@@ -686,10 +686,10 @@ bool CdbEngine::launchCDB(const DebuggerStartParameters &sp, QString *errorMessa
const QStringList &symbolPaths = stringListSetting(CdbSymbolPaths);
if (!symbolPaths.isEmpty())
arguments << QLatin1String("-y") << symbolPaths.join(QString(QLatin1Char(';')));
arguments << QLatin1String("-y") << symbolPaths.join(QLatin1Char(';'));
const QStringList &sourcePaths = stringListSetting(CdbSourcePaths);
if (!sourcePaths.isEmpty())
arguments << QLatin1String("-srcpath") << sourcePaths.join(QString(QLatin1Char(';')));
arguments << QLatin1String("-srcpath") << sourcePaths.join(QLatin1Char(';'));
// Compile argument string preserving quotes
QString nativeArguments = stringSetting(CdbAdditionalArguments);
......@@ -727,7 +727,7 @@ bool CdbEngine::launchCDB(const DebuggerStartParameters &sp, QString *errorMessa
const QString msg = QString::fromLatin1("Launching %1 %2\nusing %3 of %4.").
arg(QDir::toNativeSeparators(executable),
arguments.join(QString(blank)) + blank + nativeArguments,
arguments.join(blank) + blank + nativeArguments,
QDir::toNativeSeparators(extensionFi.absoluteFilePath()),
extensionFi.lastModified().toString(Qt::SystemLocaleShortDate));
showMessage(msg, LogMisc);
......
......@@ -2640,7 +2640,7 @@ static QString formatStartParameters(DebuggerStartParameters &sp)
<< " Local: " << sp.localMountDir << '\n';
}
str << "Sysroot: " << sp.sysRoot << '\n';
str << "Debug Source Location: " << sp.debugSourceLocation.join(QLatin1String(":")) << '\n';
str << "Debug Source Location: " << sp.debugSourceLocation.join(QLatin1Char(':')) << '\n';
return rc;
}
......
......@@ -4156,7 +4156,7 @@ void GdbEngine::startGdb(const QStringList &args)
connect(m_gdbProc, SIGNAL(readyReadStandardError()),
SLOT(readGdbStandardError()));
showMessage(_("STARTING ") + m_gdb + _(" ") + gdbArgs.join(_(" ")));
showMessage(_("STARTING ") + m_gdb + _(" ") + gdbArgs.join(QLatin1Char(' ')));
m_gdbProc->start(m_gdb, gdbArgs);
if (!m_gdbProc->waitForStarted()) {
......
......@@ -176,7 +176,7 @@ void GdbRemoteServerEngine::setupInferior()
// if (!remoteArch.isEmpty())
// postCommand("set architecture " + remoteArch);
const QString solibSearchPath
= sp.solibSearchPath.join(QString(Utils::HostOsInfo::pathListSeparator()));
= sp.solibSearchPath.join(Utils::HostOsInfo::pathListSeparator());
if (!solibSearchPath.isEmpty())
postCommand("set solib-search-path " + solibSearchPath.toLocal8Bit());
......
......@@ -254,7 +254,7 @@ void LldbEngine::startLldb()
args.append(_("-i"));
args.append(Core::ICore::resourcePath() + _("/debugger/lldbbridge.py"));
args.append(m_lldbCmd);
showMessage(_("STARTING LLDB ") + args.join(QLatin1String(" ")));
showMessage(_("STARTING LLDB ") + args.join(QLatin1Char(' ')));
m_lldbProc.setEnvironment(startParameters().environment.toStringList());
if (!startParameters().workingDirectory.isEmpty())
m_lldbProc.setWorkingDirectory(startParameters().workingDirectory);
......
......@@ -245,7 +245,7 @@ bool getUninitializedVariables(const CPlusPlus::Snapshot &snapshot,
QTextStream str(&msg);
str << "getUninitializedVariables() " << function << ' ' << file << ':' << line
<< " returns (int) " << rc << " '"
<< uninitializedVariables->join(QString(QLatin1Char(','))) << '\'';
<< uninitializedVariables->join(QLatin1Char(',')) << '\'';
if (rc)
str << " of " << snapshot.size() << " documents";