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) ...@@ -452,7 +452,7 @@ int main(int argc, char **argv)
} }
} }
if (!coreplugin) { 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); const QString reason = QCoreApplication::translate("Application", "Could not find 'Core.pluginspec' in %1").arg(nativePaths);
displayError(msgCoreLoadFailure(reason)); displayError(msgCoreLoadFailure(reason));
return 1; return 1;
......
...@@ -517,7 +517,7 @@ QString PluginManager::serializedArguments() ...@@ -517,7 +517,7 @@ QString PluginManager::serializedArguments()
rc += QLatin1Char(':'); rc += QLatin1Char(':');
rc += ps->name(); rc += ps->name();
rc += separator; rc += separator;
rc += ps->arguments().join(QString(separator)); rc += ps->arguments().join(separator);
} }
} }
if (!d->arguments.isEmpty()) { if (!d->arguments.isEmpty()) {
......
...@@ -465,7 +465,7 @@ void DeclarativeToolsClient::createQmlObject(const QString &qmlText, ...@@ -465,7 +465,7 @@ void DeclarativeToolsClient::createQmlObject(const QString &qmlText,
log(LogSend, cmd, QString::fromLatin1("%1 %2 [%3] %4").arg(qmlText, log(LogSend, cmd, QString::fromLatin1("%1 %2 [%3] %4").arg(qmlText,
QString::number(parentDebugId), QString::number(parentDebugId),
imports.join(QLatin1String(",")), filename)); imports.join(QLatin1Char(',')), filename));
sendMessage(message); sendMessage(message);
} }
......
...@@ -112,7 +112,7 @@ void QmlToolsClient::messageReceived(const QByteArray &message) ...@@ -112,7 +112,7 @@ void QmlToolsClient::messageReceived(const QByteArray &message)
} }
} }
log(LogReceive, type + ':' + event, log(LogReceive, type + ':' + event,
QString::fromLatin1("[%1]").arg(debugIdStrings.join(QLatin1String(",")))); QString::fromLatin1("[%1]").arg(debugIdStrings.join(QLatin1Char(','))));
emit currentObjectsChanged(m_currentDebugIds); emit currentObjectsChanged(m_currentDebugIds);
} }
} else { } else {
...@@ -277,7 +277,7 @@ void QmlToolsClient::createQmlObject(const QString &qmlText, ...@@ -277,7 +277,7 @@ void QmlToolsClient::createQmlObject(const QString &qmlText,
log(LogSend, CREATE_OBJECT, QString::fromLatin1("%1 %2 [%3] %4").arg(qmlText, log(LogSend, CREATE_OBJECT, QString::fromLatin1("%1 %2 [%3] %4").arg(qmlText,
QString::number(parentDebugId), QString::number(parentDebugId),
imports.join(QLatin1String(",")), filename)); imports.join(QLatin1Char(',')), filename));
sendMessage(message); sendMessage(message);
} }
......
...@@ -303,7 +303,7 @@ void CompletionContextFinder::checkImport() ...@@ -303,7 +303,7 @@ void CompletionContextFinder::checkImport()
YY_RESTORE(); YY_RESTORE();
if (m_inImport && isInLibVersionImport == 1) { if (m_inImport && isInLibVersionImport == 1) {
m_libVersion = libVersionImport.join(QLatin1String("")); m_libVersion = libVersionImport.join(QString());
if (m_libVersion.isNull()) if (m_libVersion.isNull())
m_libVersion = QLatin1String(""); m_libVersion = QLatin1String("");
} else { } else {
......
...@@ -481,10 +481,10 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info) ...@@ -481,10 +481,10 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)
--iPath; --iPath;
if (safeName.indexIn(myPath.at(iPath)) != 0) if (safeName.indexIn(myPath.at(iPath)) != 0)
break; 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); importKey.majorVersion, importKey.minorVersion);
cImport.possibleExports.append(Export(iKey, (iPath == 1) ? QLatin1String("/") : 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 { } else {
QString requiredPath = QStringList(splitPath.mid(0, splitPath.size() - importKey.splitPath.size())) QString requiredPath = QStringList(splitPath.mid(0, splitPath.size() - importKey.splitPath.size()))
...@@ -512,10 +512,10 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info) ...@@ -512,10 +512,10 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)
--iPath; --iPath;
if (safeName.indexIn(splitPath.at(iPath)) != 0) if (safeName.indexIn(splitPath.at(iPath)) != 0)
break; break;
ImportKey iKey(ImportType::Library, QStringList(splitPath.mid(iPath)).join(QLatin1String(".")), ImportKey iKey(ImportType::Library, QStringList(splitPath.mid(iPath)).join(QLatin1Char('.')),
majorVersion, minorVersion); majorVersion, minorVersion);
cImport.possibleExports.append(Export(iKey, (iPath == 1) ? QLatin1String("/") : 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()) { foreach (const QmlDirParser::Component &component, info.components()) {
......
...@@ -200,7 +200,7 @@ ImportKey ImportKey::flatKey() const { ...@@ -200,7 +200,7 @@ ImportKey ImportKey::flatKey() const {
QString ImportKey::libraryQualifiedPath() const QString ImportKey::libraryQualifiedPath() const
{ {
QString res = splitPath.join(QString::fromLatin1(".")); QString res = splitPath.join(QLatin1Char('.'));
if (res.isEmpty() && !splitPath.isEmpty()) if (res.isEmpty() && !splitPath.isEmpty())
return QLatin1String(""); return QLatin1String("");
return res; return res;
...@@ -208,7 +208,7 @@ QString ImportKey::libraryQualifiedPath() const ...@@ -208,7 +208,7 @@ QString ImportKey::libraryQualifiedPath() const
QString ImportKey::path() const QString ImportKey::path() const
{ {
QString res = splitPath.join(QString::fromLatin1("/")); QString res = splitPath.join(QLatin1Char('/'));
if (res.isEmpty() && !splitPath.isEmpty()) if (res.isEmpty() && !splitPath.isEmpty())
return QLatin1String("/"); return QLatin1String("/");
return res; return res;
...@@ -442,7 +442,7 @@ QString ImportKey::toString() const ...@@ -442,7 +442,7 @@ QString ImportKey::toString() const
res = path(); res = path();
break; break;
case ImportType::Library: case ImportType::Library:
res = splitPath.join(QLatin1String(".")); res = splitPath.join(QLatin1Char('.'));
break; break;
} }
......
...@@ -431,7 +431,7 @@ Import LinkPrivate::importNonFile(Document::Ptr doc, const ImportInfo &importInf ...@@ -431,7 +431,7 @@ Import LinkPrivate::importNonFile(Document::Ptr doc, const ImportInfo &importInf
"%1\n\n" "%1\n\n"
"For qmake projects, use the QML_IMPORT_PATH variable to add import paths.\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( "For qmlproject projects, use the importPaths property to add import paths.").arg(
importPaths.join(QLatin1String("\n")))); importPaths.join(QLatin1Char('\n'))));
} }
return import; return import;
......
...@@ -241,7 +241,7 @@ static QString qmldumpErrorMessage(const QString &libraryPath, const QString &er ...@@ -241,7 +241,7 @@ static QString qmldumpErrorMessage(const QString &libraryPath, const QString &er
static QString qmldumpFailedMessage(const QString &libraryPath, const QString &error) static QString qmldumpFailedMessage(const QString &libraryPath, const QString &error)
{ {
QString firstLines = 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") + return noTypeinfoError(libraryPath) + QLatin1String("\n\n") +
PluginDumper::tr("Automatic type dump of QML module failed.\n" PluginDumper::tr("Automatic type dump of QML module failed.\n"
"First 10 lines or errors:\n" "First 10 lines or errors:\n"
...@@ -412,9 +412,9 @@ void PluginDumper::loadQmltypesFile(const QStringList &qmltypesFilePaths, ...@@ -412,9 +412,9 @@ void PluginDumper::loadQmltypesFile(const QStringList &qmltypesFilePaths,
if (errors.isEmpty()) { if (errors.isEmpty()) {
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::TypeInfoFileDone); libraryInfo.setPluginTypeInfoStatus(LibraryInfo::TypeInfoFileDone);
} else { } else {
printParseWarnings(libraryPath, errors.join(QLatin1String("\n"))); printParseWarnings(libraryPath, errors.join(QLatin1Char('\n')));
errors.prepend(tr("Errors while reading typeinfo files:")); 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()) if (!warnings.isEmpty())
......
...@@ -301,7 +301,7 @@ protected: ...@@ -301,7 +301,7 @@ protected:
continue; continue;
// the extra space is to avoid // comments sticking to the 0 offset // 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); int indent = tryIndent(indentLine);
QList<Split> newSplits = possibleSplits.mid(i + 1); QList<Split> newSplits = possibleSplits.mid(i + 1);
......
...@@ -235,7 +235,7 @@ static bool runBuildProcess(QProcess &proc, ...@@ -235,7 +235,7 @@ static bool runBuildProcess(QProcess &proc,
QString cmd = binary.toString(); QString cmd = binary.toString();
if (!args.isEmpty()) { if (!args.isEmpty()) {
cmd += QLatin1Char(' '); cmd += QLatin1Char(' ');
cmd += args.join(QString(QLatin1Char(' '))); cmd += args.join(QLatin1Char(' '));
} }
*errorMessage = *errorMessage =
QCoreApplication::translate("ProjectExplorer::BuildableHelperLibrary", QCoreApplication::translate("ProjectExplorer::BuildableHelperLibrary",
...@@ -287,7 +287,7 @@ bool BuildableHelperLibrary::buildHelper(const BuildHelperArguments &arguments, ...@@ -287,7 +287,7 @@ bool BuildableHelperLibrary::buildHelper(const BuildHelperArguments &arguments,
log->append(newline); log->append(newline);
log->append(QCoreApplication::translate("ProjectExplorer::BuildableHelperLibrary", log->append(QCoreApplication::translate("ProjectExplorer::BuildableHelperLibrary",
"Running %1 %2 ...\n").arg(arguments.qmakeCommand.toUserOutput(), "Running %1 %2 ...\n").arg(arguments.qmakeCommand.toUserOutput(),
qmakeArgs.join(QLatin1String(" ")))); qmakeArgs.join(QLatin1Char(' '))));
if (!runBuildProcess(proc, arguments.qmakeCommand, qmakeArgs, 30000, false, log, errorMessage)) if (!runBuildProcess(proc, arguments.qmakeCommand, qmakeArgs, 30000, false, log, errorMessage))
return false; return false;
...@@ -299,7 +299,7 @@ bool BuildableHelperLibrary::buildHelper(const BuildHelperArguments &arguments, ...@@ -299,7 +299,7 @@ bool BuildableHelperLibrary::buildHelper(const BuildHelperArguments &arguments,
} }
log->append(QCoreApplication::translate("ProjectExplorer::BuildableHelperLibrary", log->append(QCoreApplication::translate("ProjectExplorer::BuildableHelperLibrary",
"Running %1 %2 ...\n") "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)) if (!runBuildProcess(proc, makeFullPath, arguments.makeArguments, 120000, false, log, errorMessage))
return false; return false;
return true; return true;
......
...@@ -202,7 +202,7 @@ QStringList PathListEditor::pathList() const ...@@ -202,7 +202,7 @@ QStringList PathListEditor::pathList() const
void PathListEditor::setPathList(const QStringList &l) 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) void PathListEditor::setPathList(const QString &pathString)
......
...@@ -539,7 +539,7 @@ AndroidConfig::CreateAvdInfo AndroidConfig::createAVDImpl(CreateAvdInfo info, Ut ...@@ -539,7 +539,7 @@ AndroidConfig::CreateAvdInfo AndroidConfig::createAVDImpl(CreateAvdInfo info, Ut
proc.start(androidToolPath.toString(), arguments); proc.start(androidToolPath.toString(), arguments);
if (!proc.waitForStarted()) { if (!proc.waitForStarted()) {
info.error = QApplication::translate("AndroidConfig", "Could not start process \"%1 %2\"") 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; return info;
} }
......
...@@ -328,18 +328,18 @@ void AndroidDeployQtStep::run(QFutureInterface<bool> &fi) ...@@ -328,18 +328,18 @@ void AndroidDeployQtStep::run(QFutureInterface<bool> &fi)
void AndroidDeployQtStep::runCommand(const QString &program, const QStringList &arguments) void AndroidDeployQtStep::runCommand(const QString &program, const QStringList &arguments)
{ {
QProcess buildProc; 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); buildProc.start(program, arguments);
if (!buildProc.waitForStarted()) { if (!buildProc.waitForStarted()) {
emit addOutput(tr("Packaging error: Could not start command \"%1 %2\". Reason: %3") 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; return;
} }
if (!buildProc.waitForFinished(2 * 60 * 1000) if (!buildProc.waitForFinished(2 * 60 * 1000)
|| buildProc.error() != QProcess::UnknownError || buildProc.error() != QProcess::UnknownError
|| buildProc.exitCode() != 0) { || buildProc.exitCode() != 0) {
QString mainMessage = tr("Packaging Error: Command \"%1 %2\" failed.") 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) if (buildProc.error() != QProcess::UnknownError)
mainMessage += QLatin1Char(' ') + tr("Reason: %1").arg(buildProc.errorString()); mainMessage += QLatin1Char(' ') + tr("Reason: %1").arg(buildProc.errorString());
else else
......
...@@ -183,7 +183,7 @@ public: ...@@ -183,7 +183,7 @@ public:
QString lineText; QString lineText;
if (node->incompatibleReason().isEmpty()) { if (node->incompatibleReason().isEmpty()) {
lineText = AndroidManager::androidNameForApiLevel(device.sdk) + QLatin1String(" "); lineText = AndroidManager::androidNameForApiLevel(device.sdk) + QLatin1String(" ");
lineText += AndroidDeviceDialog::tr("ABI:") + device.cpuAbi.join(QLatin1String(" ")); lineText += AndroidDeviceDialog::tr("ABI:") + device.cpuAbi.join(QLatin1Char(' '));
} else { } else {
lineText = node->incompatibleReason(); lineText = node->incompatibleReason();
} }
...@@ -342,7 +342,7 @@ void AndroidDeviceModel::setDevices(const QVector<AndroidDeviceInfo> &devices) ...@@ -342,7 +342,7 @@ void AndroidDeviceModel::setDevices(const QVector<AndroidDeviceInfo> &devices)
.arg(device.serialNumber); .arg(device.serialNumber);
} else if (!device.cpuAbi.contains(m_abi)) { } else if (!device.cpuAbi.contains(m_abi)) {
error = AndroidDeviceDialog::tr("ABI is incompatible, device supports ABIs: %1.") 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) { } else if (device.sdk < m_apiLevel) {
error = AndroidDeviceDialog::tr("API Level of device is: %1.") error = AndroidDeviceDialog::tr("API Level of device is: %1.")
.arg(device.sdk); .arg(device.sdk);
......
...@@ -416,7 +416,7 @@ static QString loadLocal(ProjectExplorer::Target *target, int apiLevel, ItemType ...@@ -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 // The next loop requires all library names to end with a ":" so we append one
// to the end after joining. // to the end after joining.
localLibs = dependencyLibs.join(QLatin1String(":")) + QLatin1Char(':'); localLibs = dependencyLibs.join(QLatin1Char(':')) + QLatin1Char(':');
foreach (QString replacedLib, replacedLibs) foreach (QString replacedLib, replacedLibs)
localLibs.remove(replacedLib + QLatin1Char(':')); localLibs.remove(replacedLib + QLatin1Char(':'));
...@@ -486,7 +486,7 @@ void AndroidManager::cleanLibsOnDevice(ProjectExplorer::Target *target) ...@@ -486,7 +486,7 @@ void AndroidManager::cleanLibsOnDevice(ProjectExplorer::Target *target)
arguments << QLatin1String("shell") << QLatin1String("rm") << QLatin1String("-r") << QLatin1String("/data/local/tmp/qt"); arguments << QLatin1String("shell") << QLatin1String("rm") << QLatin1String("-r") << QLatin1String("/data/local/tmp/qt");
process->connect(process, SIGNAL(finished(int)), process, SLOT(deleteLater())); process->connect(process, SIGNAL(finished(int)), process, SLOT(deleteLater()));
const QString adb = AndroidConfigurations::currentConfig().adbToolPath().toString(); 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); process->start(adb, arguments);
if (!process->waitForStarted(500)) if (!process->waitForStarted(500))
delete process; delete process;
...@@ -516,7 +516,7 @@ void AndroidManager::installQASIPackage(ProjectExplorer::Target *target, const Q ...@@ -516,7 +516,7 @@ void AndroidManager::installQASIPackage(ProjectExplorer::Target *target, const Q
process->connect(process, SIGNAL(finished(int)), process, SLOT(deleteLater())); process->connect(process, SIGNAL(finished(int)), process, SLOT(deleteLater()));
const QString adb = AndroidConfigurations::currentConfig().adbToolPath().toString(); 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); process->start(adb, arguments);
if (!process->waitForFinished(500)) if (!process->waitForFinished(500))
delete process; delete process;
......
...@@ -207,7 +207,7 @@ void ArtisticStyleSettings::createDocumentationFile() const ...@@ -207,7 +207,7 @@ void ArtisticStyleSettings::createDocumentationFile() const
const QString text = QLatin1String("<p><span class=\"option\">") const QString text = QLatin1String("<p><span class=\"option\">")
+ keys.filter(QRegExp(QLatin1String("^\\-"))).join(QLatin1String(", ")) + keys.filter(QRegExp(QLatin1String("^\\-"))).join(QLatin1String(", "))
+ QLatin1String("</span></p><p>") + QLatin1String("</span></p><p>")
+ Qt::escape(docu.join(QLatin1String(" "))) + Qt::escape(docu.join(QLatin1Char(' ')))
+ QLatin1String("</p>"); + QLatin1String("</p>");
stream.writeTextElement(QLatin1String(Constants::DOCUMENTATION_XMLDOC), text); stream.writeTextElement(QLatin1String(Constants::DOCUMENTATION_XMLDOC), text);
stream.writeEndElement(); stream.writeEndElement();
......
...@@ -66,7 +66,7 @@ void ConfigurationSyntaxHighlighter::setKeywords(const QStringList &keywords) ...@@ -66,7 +66,7 @@ void ConfigurationSyntaxHighlighter::setKeywords(const QStringList &keywords)
pattern << QRegExp::escape(word); pattern << QRegExp::escape(word);
} }
m_expressionKeyword.setPattern(QLatin1String("(?:\\s|^)(") + pattern.join(QLatin1String("|")) m_expressionKeyword.setPattern(QLatin1String("(?:\\s|^)(") + pattern.join(QLatin1Char('|'))
+ QLatin1String(")(?=\\s|\\:|\\=|\\,|$)")); + QLatin1String(")(?=\\s|\\:|\\=|\\,|$)"));
} }
......
...@@ -153,7 +153,7 @@ void UncrustifySettings::createDocumentationFile() const ...@@ -153,7 +153,7 @@ void UncrustifySettings::createDocumentationFile() const
const QString text = QLatin1String("<p><span class=\"option\">") + keyword const QString text = QLatin1String("<p><span class=\"option\">") + keyword
+ QLatin1String("</span> <span class=\"param\">") + options + QLatin1String("</span> <span class=\"param\">") + options
+ QLatin1String("</span></p><p>") + QLatin1String("</span></p><p>")
+ Qt::escape(docu.join(QLatin1String(" "))) + Qt::escape(docu.join(QLatin1Char(' ')))
+ QLatin1String("</p>"); + QLatin1String("</p>");
stream.writeStartElement(QLatin1String(Constants::DOCUMENTATION_XMLENTRY)); stream.writeStartElement(QLatin1String(Constants::DOCUMENTATION_XMLENTRY));
stream.writeTextElement(QLatin1String(Constants::DOCUMENTATION_XMLKEY), keyword); stream.writeTextElement(QLatin1String(Constants::DOCUMENTATION_XMLKEY), keyword);
......
...@@ -95,7 +95,7 @@ static QString commandLine(const QStringList &options, const QString &fileName) ...@@ -95,7 +95,7 @@ static QString commandLine(const QStringList &options, const QString &fileName)
foreach (const QString &option, allOptions) foreach (const QString &option, allOptions)
allOptionsQuoted.append(QLatin1Char('\'') + option + QLatin1Char('\'')); allOptionsQuoted.append(QLatin1Char('\'') + option + QLatin1Char('\''));
return ::Utils::HostOsInfo::withExecutableSuffix(QLatin1String("clang")) return ::Utils::HostOsInfo::withExecutableSuffix(QLatin1String("clang"))
+ QLatin1Char(' ') + allOptionsQuoted.join(QLatin1String(" ")); + QLatin1Char(' ') + allOptionsQuoted.join(QLatin1Char(' '));
} }
void CreateMarkers::run() void CreateMarkers::run()
......
...@@ -113,7 +113,7 @@ void PchManager::setPCHInfo(const QList<ProjectPart::Ptr> &projectParts, ...@@ -113,7 +113,7 @@ void PchManager::setPCHInfo(const QList<ProjectPart::Ptr> &projectParts,
pchInfo->fileName()), Core::MessageManager::Silent); pchInfo->fileName()), Core::MessageManager::Silent);
} }
if (!msgs.second.isEmpty()) 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() ...@@ -302,7 +302,7 @@ void ClangCodeModelPlugin::test_ObjC_hints()
QVERIFY2(hint == ccr.hint(), hintError.arg(ccr.hint()).toAscii()); QVERIFY2(hint == ccr.hint(), hintError.arg(ccr.hint()).toAscii());
} }
const QString textError(QString::fromLatin1("Text \"%1\" not found in set %2") 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()); QVERIFY2(hasText, textError.toAscii());
} }
} }
......
...@@ -98,7 +98,7 @@ bool VersionSelector::readValues() ...@@ -98,7 +98,7 @@ bool VersionSelector::readValues()
break; break;
messageLines << line; messageLines << line;
} while (!m_stream->atEnd()); } while (!m_stream->atEnd());
m_message = messageLines.join(QLatin1String(" ")); m_message = messageLines.join(QLatin1Char(' '));
return true; return true;
} }
......
...@@ -416,7 +416,7 @@ void NewDialog::currentItemChanged(const QModelIndex &index) ...@@ -416,7 +416,7 @@ void NewDialog::currentItemChanged(const QModelIndex &index)
else else
desciption += tr("Supported Platforms") desciption += tr("Supported Platforms")
+ QLatin1String("</b>: <tt>") + QLatin1String("</b>: <tt>")
+ displayNamesForSupportedPlatforms.join(QLatin1String(" ")) + displayNamesForSupportedPlatforms.join(QLatin1Char(' '))
+ QLatin1String("</tt>"); + QLatin1String("</tt>");
m_ui->templateDescription->setHtml(desciption); m_ui->templateDescription->setHtml(desciption);
......
...@@ -234,7 +234,7 @@ void ReadOnlyFilesDialog::promptFailWarning(const QStringList &files, ReadOnlyRe ...@@ -234,7 +234,7 @@ void ReadOnlyFilesDialog::promptFailWarning(const QStringList &files, ReadOnlyRe
message = d->failWarning; message = d->failWarning;
message += QLatin1Char('\n'); message += QLatin1Char('\n');
message += tr("See details for a complete list of files."); 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 msgBox(QMessageBox::Warning, title, message,
QMessageBox::Ok, ICore::dialogParent()); QMessageBox::Ok, ICore::dialogParent());
......
...@@ -1113,7 +1113,7 @@ void DocumentManager::checkForReload() ...@@ -1113,7 +1113,7 @@ void DocumentManager::checkForReload()
} }
if (!errorStrings.isEmpty()) if (!errorStrings.isEmpty())
QMessageBox::critical(ICore::dialogParent(), tr("File Error"), QMessageBox::critical(ICore::dialogParent(), tr("File Error"),
errorStrings.join(QLatin1String("\n"))); errorStrings.join(QLatin1Char('\n')));
// handle deleted files // handle deleted files
EditorManager::closeDocuments(documentsToClose, false); EditorManager::closeDocuments(documentsToClose, false);
......
...@@ -1531,7 +1531,7 @@ void EditorManagerPrivate::autoSave() ...@@ -1531,7 +1531,7 @@ void EditorManagerPrivate::autoSave()
} }
if (!errors.isEmpty()) if (!errors.isEmpty())
QMessageBox::critical(ICore::mainWindow(), tr("File Error"), QMessageBox::critical(ICore::mainWindow(), tr("File Error"),
errors.join(QLatin1String("\n"))); errors.join(QLatin1Char('\n')));
}