aboutsummaryrefslogtreecommitdiff
path: root/src/kconfig_compiler/KConfigXmlParser.cpp
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2021-02-23 17:09:33 +0200
committerAhmad Samir <a.samirh78@gmail.com>2021-03-06 01:35:09 +0200
commitd5ca63b954407b36c18c70e2ecace7b30694558d (patch)
treee855e65e89e56d0c63e60c1ffc7316bd051607b6 /src/kconfig_compiler/KConfigXmlParser.cpp
parent23f55a865bdc1b5f7f462b35e8788ea3e2cbc121 (diff)
downloadkconfig-d5ca63b954407b36c18c70e2ecace7b30694558d.tar.gz
kconfig-d5ca63b954407b36c18c70e2ecace7b30694558d.tar.bz2
Improve code readability by using QLatin1String::arg()
NO_CHANGELOG
Diffstat (limited to 'src/kconfig_compiler/KConfigXmlParser.cpp')
-rw-r--r--src/kconfig_compiler/KConfigXmlParser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kconfig_compiler/KConfigXmlParser.cpp b/src/kconfig_compiler/KConfigXmlParser.cpp
index 7dc1d9f0..9815d1cd 100644
--- a/src/kconfig_compiler/KConfigXmlParser.cpp
+++ b/src/kconfig_compiler/KConfigXmlParser.cpp
@@ -38,7 +38,7 @@ static void preProcessDefault(QString &defaultValue,
defaultValue = literalString(defaultValue);
} else if (type == QLatin1String("Url") && !defaultValue.isEmpty()) {
// Use fromUserInput in order to support absolute paths and absolute urls, like KDE4's KUrl(QString) did.
- defaultValue = QLatin1String("QUrl::fromUserInput( ") + literalString(defaultValue) + QLatin1Char(')');
+ defaultValue = QLatin1String("QUrl::fromUserInput( %1)").arg(literalString(defaultValue));
} else if ((type == QLatin1String("UrlList") || type == QLatin1String("StringList") || type == QLatin1String("PathList")) && !defaultValue.isEmpty()) {
QTextStream cpp(&code, QIODevice::WriteOnly | QIODevice::Append);
if (!code.isEmpty()) {
@@ -68,9 +68,9 @@ static void preProcessDefault(QString &defaultValue,
static const QRegularExpression colorRe(QRegularExpression::anchoredPattern(QStringLiteral("\\d+,\\s*\\d+,\\s*\\d+(,\\s*\\d+)?")));
if (colorRe.match(defaultValue).hasMatch()) {
- defaultValue = QLatin1String("QColor( ") + defaultValue + QLatin1String(" )");
+ defaultValue = QLatin1String("QColor( %1 )").arg(defaultValue);
} else {
- defaultValue = QLatin1String("QColor( \"") + defaultValue + QLatin1String("\" )");
+ defaultValue = QLatin1String("QColor( \"%1\" )").arg(defaultValue);
}
} else if (type == QLatin1String("Enum")) {