Use QLatin1String overload for QStringList::join

GIT_SILENT
parent bf8e1bff
......@@ -243,7 +243,7 @@ void BuilderJob::updateJobName()
for (ProjectBaseItem* item : qAsConst(registeredItems)) {
itemNamesList << item->text();
}
itemNames = itemNamesList.join(QStringLiteral(", "));
itemNames = itemNamesList.join(QLatin1String(", "));
} else {
itemNames = i18nc( "Unspecified set of build items (e. g. projects, targets)", "Various items" );
}
......@@ -254,7 +254,7 @@ void BuilderJob::updateJobName()
for (BuildType type : qAsConst(buildTypes)) {
methodNamesList << d->buildTypeToString( type );
}
methodNames = methodNamesList.join( QStringLiteral( ", " ) );
methodNames = methodNamesList.join(QLatin1String(", "));
QString jobName = QStringLiteral( "%1: %2" ).arg( itemNames, methodNames );
setObjectName( jobName );
......
......@@ -190,7 +190,7 @@ QString SessionPrivate::generatePrettyContents( const SessionInfo& info )
if( projectNames.isEmpty() ) {
return i18n("(no projects)");
} else {
return projectNames.join( QStringLiteral(", ") );
return projectNames.join(QLatin1String(", "));
}
}
......
......@@ -80,7 +80,7 @@ CXChildVisitResult templateParamsHelper(CXCursor cursor, CXCursor /*parent*/, CX
} else if (kind == CXCursor_TemplateTemplateParameter) {
auto paramName = ClangString(clang_getCursorSpelling(cursor)).toString();
auto templateTypes = templateParams(cursor);
QString param = QLatin1String("template<") + templateTypes.join(QStringLiteral(", ")) + QLatin1String("> class ") + paramName ;
QString param = QLatin1String("template<") + templateTypes.join(QLatin1String(", ")) + QLatin1String("> class ") + paramName ;
params.append(param);
}
return CXChildVisit_Continue;
......@@ -270,7 +270,7 @@ CXChildVisitResult declVisitor(CXCursor cursor, CXCursor parent, CXClientData d)
//which goes at the front of the prototype
const QStringList templateTypes = templateParams(kind == CXCursor_ClassTemplate ? cursor : clang_getSpecializedCursorTemplate(cursor));
templatePrefix = QLatin1String("template<") + templateTypes.join(QStringLiteral(", ")) + QLatin1String("> ");
templatePrefix = QLatin1String("template<") + templateTypes.join(QLatin1String(", ")) + QLatin1String("> ");
}
}
......@@ -318,7 +318,7 @@ CXChildVisitResult declVisitor(CXCursor cursor, CXCursor parent, CXClientData d)
QString templatePrefix;
if (kind == CXCursor_FunctionTemplate) {
const QStringList templateTypes = templateParams(cursor);
templatePrefix = QLatin1String("template<") + templateTypes.join(QStringLiteral(", ")) + QLatin1String("> ");
templatePrefix = QLatin1String("template<") + templateTypes.join(QLatin1String(", ")) + QLatin1String("> ");
}
const auto scope = ClangUtils::getScope(cursor, data->origin);
......
......@@ -1333,7 +1333,7 @@ void ClangCodeCompletionContext::addOverwritableItems()
for (const auto& param : info.params) {
params << param.type + QLatin1Char(' ') + param.id;
}
QString nameAndParams = info.name + QLatin1Char('(') + params.join(QStringLiteral(", ")) + QLatin1Char(')');
QString nameAndParams = info.name + QLatin1Char('(') + params.join(QLatin1String(", ")) + QLatin1Char(')');
if(info.isConst)
nameAndParams = nameAndParams + QLatin1String(" const");
if(info.isPureVirtual)
......
......@@ -144,7 +144,7 @@ void SourceCodeInsertion::setSubScope(const QualifiedIdentifier& scope)
}
}
m_scope = stripPrefixes(m_context, QualifiedIdentifier(needNamespace.join(QStringLiteral("::"))));
m_scope = stripPrefixes(m_context, QualifiedIdentifier(needNamespace.join(QLatin1String("::"))));
}
QString SourceCodeInsertion::applySubScope(const QString& decl) const
......
......@@ -55,7 +55,7 @@ QString MacroNavigationContext::html(bool shorten)
parameterList << parameter.str();
}
const QString parameters = (!parameterList.isEmpty() ?
QStringLiteral("(%1)").arg(parameterList.join(QStringLiteral(", "))) :
QLatin1Char('(') + parameterList.join(QLatin1String(", ")) + QLatin1Char(')') :
QString());
const QUrl url = m_macro->url().toUrl();
......
......@@ -224,7 +224,7 @@ QString ClangUtils::getScope(CXCursor cursor, CXCursor context)
scope.prepend(ClangString(clang_getCursorDisplayName(search)).toString());
search = clang_getCursorSemanticParent(search);
}
return scope.join(QStringLiteral("::"));
return scope.join(QLatin1String("::"));
}
QString ClangUtils::getCursorSignature(CXCursor cursor, const QString& scope, const QVector<QString>& defaultArgs)
......
......@@ -266,7 +266,7 @@ QVariant CMakeCodeCompletionModel::data (const QModelIndex & index, int role) co
DelayedType::Ptr delay = t.cast<DelayedType>();
args.append(delay ? delay->identifier().toString() : i18n("wrong"));
}
return QString(QLatin1Char('(')+args.join(QStringLiteral(", "))+QLatin1Char(')'));
return QString(QLatin1Char('(') + args.join(QLatin1String(", ")) + QLatin1Char(')'));
}
}
......
......@@ -282,7 +282,7 @@ KDevelop::IProblem::Ptr CppcheckParser::getProblem(int locationIdx) const
}
if (!messagePrefix.isEmpty()) {
errorMessage = QStringLiteral("(%1) %2").arg(messagePrefix.join(QStringLiteral(", ")), m_errorMessage);
errorMessage = QStringLiteral("(%1) %2").arg(messagePrefix.join(QLatin1String(", ")), m_errorMessage);
}
problem->setDescription(errorMessage);
......
......@@ -126,7 +126,7 @@ void OutputPagePrivate::validate()
std::sort(invalidFiles.begin(), invalidFiles.end());
output->messageWidget->setMessageType(KMessageWidget::Error);
output->messageWidget->setCloseButtonVisible(false);
output->messageWidget->setText(i18np("Invalid output file: %2", "Invalid output files: %2", invalidFiles.count(), invalidFiles.join(QStringLiteral(", "))));
output->messageWidget->setText(i18np("Invalid output file: %2", "Invalid output files: %2", invalidFiles.count(), invalidFiles.join(QLatin1String(", "))));
output->messageWidget->animatedShow();
}
emit page->isValid(valid);
......
......@@ -70,7 +70,7 @@ static QString functionPropertiesToString(ClassFunctionDeclaration* decl)
} else if (decl->isAbstract()) {
properties << i18n("Abstract function");
}
return properties.join(QStringLiteral(", "));
return properties.join(QLatin1String(", "));
}
struct KDevelop::OverridesPagePrivate
......
......@@ -109,7 +109,7 @@ QVariant CompletionItem::data(const QModelIndex& index, int role, const CodeComp
args.append(arg->toString());
}
return QStringLiteral("(%1)").arg(args.join(QStringLiteral(", ")));
return QVariant(QLatin1Char('(') + args.join(QLatin1String(", ")) +QLatin1Char(')'));
}
}
}
......
......@@ -162,7 +162,7 @@ QString QtHelpDocumentation::description() const
return thisFragment;
}
return QStringList(m_info.keys()).join(QStringLiteral(", "));
return QStringList(m_info.keys()).join(QLatin1String(", "));
}
void QtHelpDocumentation::setUserStyleSheet(StandardDocumentationView* view, const QUrl& url)
......
......@@ -306,7 +306,7 @@ void QuickOpenWidget::updateProviders()
}
}
ui.itemsButton->setText(checkedItems.join(QStringLiteral(", ")));
ui.itemsButton->setText(checkedItems.join(QLatin1String(", ")));
}
QStringList checkedScopes;
......@@ -321,7 +321,7 @@ void QuickOpenWidget::updateProviders()
}
}
ui.scopesButton->setText(checkedScopes.join(QStringLiteral(", ")));
ui.scopesButton->setText(checkedScopes.join(QLatin1String(", ")));
}
emit itemsChanged(checkedItems);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment