diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2024-05-10 16:27:40 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2024-05-10 16:44:41 +0000 |
commit | 99acd3247fa5d92ff4237350d16c32305eb1cd5c (patch) | |
tree | ad5ed6d7d92315acc798b4ba281dbe14af2f2d9c | |
parent | 6fea65f029ee8bbdcb0162b8c5ee31e65fa5dbfe (diff) |
Android: Simplify create avd command
Simplify the code copied from the original place.
Amends be222eaff4da289bc83c0e8f177b0ed8a7420719
Change-Id: Ie90da2c2c515b948d0e1321a2c8fb8f7d48b9eb8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
-rw-r--r-- | src/plugins/android/avddialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/android/avddialog.cpp b/src/plugins/android/avddialog.cpp index 8239a181af..2e439c339c 100644 --- a/src/plugins/android/avddialog.cpp +++ b/src/plugins/android/avddialog.cpp @@ -138,7 +138,7 @@ int AvdDialog::exec() const QString deviceDef = deviceDefinition(); if (!deviceDef.isEmpty() && deviceDef != "Custom") - cmd.addArgs({"-d", QString("%1").arg(deviceDef)}); + cmd.addArgs({"-d", deviceDef}); if (m_overwriteCheckBox->isChecked()) cmd.addArg("-f"); @@ -155,7 +155,7 @@ int AvdDialog::exec() buffer += process.readAllRawStandardOutput(); if (buffer.endsWith(QByteArray("]:"))) { // truncate to last line - const int index = buffer.lastIndexOf(QByteArray("\n")); + const int index = buffer.lastIndexOf('\n'); if (index != -1) buffer = buffer.mid(index); if (buffer.contains("hw.gpu.enabled")) |