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>
This commit is contained in:
Sona Kurazyan 2022-04-13 16:51:18 +02:00
parent b28ed7fdc2
commit adad2a468d
3 changed files with 9 additions and 9 deletions

View File

@ -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;

View File

@ -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)));

View File

@ -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()