forked from qt-creator/qt-creator
Android: Simplify create avd command
Simplify the code copied from the original place.
Amends be222eaff4
Change-Id: Ie90da2c2c515b948d0e1321a2c8fb8f7d48b9eb8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -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"))
|
||||
|
Reference in New Issue
Block a user