diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2019-02-19 22:16:04 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2019-02-25 15:58:40 +0000 |
commit | 0876dc4d6abb147ccdcc190adfad01c704a73e61 (patch) | |
tree | e8a1d558827e2a9e4092600cbe1a2029895d9f99 /src/plugins/generator/makefilegenerator | |
parent | e160b26d8c7476c63f6220ac69d1d6405e8ce3aa (diff) |
Use QStringLiteral more where it is possible
Change-Id: I7419cc3fbc1e8776de3943852dcedab4c95d1c32
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/generator/makefilegenerator')
-rw-r--r-- | src/plugins/generator/makefilegenerator/makefilegenerator.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/generator/makefilegenerator/makefilegenerator.cpp b/src/plugins/generator/makefilegenerator/makefilegenerator.cpp index 11b9297d7..f186b5244 100644 --- a/src/plugins/generator/makefilegenerator/makefilegenerator.cpp +++ b/src/plugins/generator/makefilegenerator/makefilegenerator.cpp @@ -68,10 +68,10 @@ QString qbs::MakefileGenerator::generatorName() const static QString quote(const QString &s) { QString quoted = shellQuote(s); - quoted.replace(QLatin1Char('$'), QStringLiteral("$$")); // For make - quoted.replace(QStringLiteral("$$(SRCDIR)"), QStringLiteral("$(SRCDIR)")); - quoted.replace(QStringLiteral("$$(BUILD_ROOT)"), QStringLiteral("$(BUILD_ROOT)")); - quoted.replace(QStringLiteral("$$(INSTALL_ROOT)"), QStringLiteral("$(INSTALL_ROOT)")); + quoted.replace(QLatin1Char('$'), QLatin1String("$$")); // For make + quoted.replace(QLatin1String("$$(SRCDIR)"), QLatin1String("$(SRCDIR)")); + quoted.replace(QLatin1String("$$(BUILD_ROOT)"), QLatin1String("$(BUILD_ROOT)")); + quoted.replace(QLatin1String("$$(INSTALL_ROOT)"), QLatin1String("$(INSTALL_ROOT)")); return quoted; } @@ -133,7 +133,7 @@ static QString bruteForcePathReplace(const QString &value, const QString &srcDir static QString mkdirCmdLine(const QString &dir) { if (HostOsInfo::isWindowsHost()) - return QString::fromLatin1("if not exist %1 mkdir %1 & if not exist %1 exit 1").arg(dir); + return QStringLiteral("if not exist %1 mkdir %1 & if not exist %1 exit 1").arg(dir); return QStringLiteral("mkdir -p ") + dir; } @@ -340,7 +340,7 @@ void qbs::MakefileGenerator::generate() "Makefile-compatible, because they depend entirely on JavaScriptCommands. " "The build is probably not fully functional. " "Affected build artifacts:\n\t%1") - .arg(filesCreatedByJsCommands.join(QStringLiteral("\n\t"))); + .arg(filesCreatedByJsCommands.join(QLatin1String("\n\t"))); } else if (jsCommandsEncountered) { logger().qbsWarning() << Tr::tr("Some rules in this project use JavaScriptCommands, " "which cannot be converted to Makefile-compatible constructs. The build may " |