summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-04-13 16:51:18 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2022-04-14 15:29:06 +0200
commitadad2a468da41f5ce0b39b866f1f5c652ae89d87 (patch)
tree22ce9755f87aab09c6663a53fce3b3415bbbccc9 /src
parentb28ed7fdc23e152e646c36e218aa41f05adb28ec (diff)
Android: replace remaining uses of QLatin1String with QLatin1StringView
Task-number: QTBUG-98434 Change-Id: I35a97eef61746039738b4a5f2271c3bffd5711b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/android/qandroidplatformtheme.cpp4
-rw-r--r--src/tools/androiddeployqt/main.cpp8
-rw-r--r--src/tools/androidtestrunner/main.cpp6
3 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformtheme.cpp b/src/plugins/platforms/android/qandroidplatformtheme.cpp
index cb970ff291..654a22153a 100644
--- a/src/plugins/platforms/android/qandroidplatformtheme.cpp
+++ b/src/plugins/platforms/android/qandroidplatformtheme.cpp
@@ -189,14 +189,14 @@ static void setPaletteColor(const QVariantMap &object,
QJsonObject AndroidStyle::loadStyleData()
{
- QString stylePath(QLatin1String(qgetenv("ANDROID_STYLE_PATH")));
+ QString stylePath(QLatin1StringView(qgetenv("ANDROID_STYLE_PATH")));
const QLatin1Char slashChar('/');
if (!stylePath.isEmpty() && !stylePath.endsWith(slashChar))
stylePath += slashChar;
Q_ASSERT(!stylePath.isEmpty());
- QString androidTheme = QLatin1String(qgetenv("QT_ANDROID_THEME"));
+ QString androidTheme = QLatin1StringView(qgetenv("QT_ANDROID_THEME"));
if (!androidTheme.isEmpty() && !androidTheme.endsWith(slashChar))
androidTheme += slashChar;
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index 7b4ccc3114..8473ddcacc 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -2248,7 +2248,7 @@ bool createRcc(const Options &options)
if (!res)
return false;
- QLatin1String noZstd;
+ QLatin1StringView noZstd;
if (!options.isZstdCompressionEnabled)
noZstd = "--no-zstd"_L1;
@@ -2982,7 +2982,7 @@ bool jarSignerSignPackage(const Options &options)
}
zipAlignTool = "%1%2 -f 4 %3 %4"_L1.arg(shellQuote(zipAlignTool),
- options.verbose ? " -v"_L1 : QLatin1String(),
+ options.verbose ? " -v"_L1 : QLatin1StringView(),
shellQuote(packagePath(options, UnsignedAPK)),
shellQuote(packagePath(options, SignedAPK)));
@@ -3052,7 +3052,7 @@ bool signPackage(const Options &options)
const QString verifyZipAlignCommandLine =
"%1%2 -c 4 %3"_L1
.arg(shellQuote(zipAlignTool),
- options.verbose ? " -v"_L1 : QLatin1String(),
+ options.verbose ? " -v"_L1 : QLatin1StringView(),
shellQuote(packagePath(options, UnsignedAPK)));
if (zipalignRunner(verifyZipAlignCommandLine)) {
@@ -3073,7 +3073,7 @@ bool signPackage(const Options &options)
const QString zipAlignCommandLine =
"%1%2 -f 4 %3 %4"_L1
.arg(shellQuote(zipAlignTool),
- options.verbose ? " -v"_L1 : QLatin1String(),
+ options.verbose ? " -v"_L1 : QLatin1StringView(),
shellQuote(packagePath(options, UnsignedAPK)),
shellQuote(packagePath(options, SignedAPK)));
diff --git a/src/tools/androidtestrunner/main.cpp b/src/tools/androidtestrunner/main.cpp
index b4486d4d26..08558e0353 100644
--- a/src/tools/androidtestrunner/main.cpp
+++ b/src/tools/androidtestrunner/main.cpp
@@ -78,7 +78,7 @@ static bool checkTxt(const QByteArray &data) {
return false;
// Look for "********* Finished testing of tst_QTestName *********"
static const QRegularExpression testTail("\\*+ +Finished testing of .+ +\\*+"_L1);
- return testTail.match(QLatin1String(data)).hasMatch();
+ return testTail.match(QLatin1StringView(data)).hasMatch();
}
static bool checkCsv(const QByteArray &data) {
@@ -130,7 +130,7 @@ static bool checkTap(const QByteArray &data) {
return false;
static const QRegularExpression testTail("ok [0-9]* - cleanupTestCase\\(\\)"_L1);
- return testTail.match(QLatin1String(data)).hasMatch();
+ return testTail.match(QLatin1StringView(data)).hasMatch();
}
struct Options
@@ -453,7 +453,7 @@ static bool isRunning() {
return false;
}
- return output.indexOf(QLatin1String(" " + g_options.package.toUtf8())) > -1;
+ return output.indexOf(QLatin1StringView(" " + g_options.package.toUtf8())) > -1;
}
static bool waitToFinish()