forked from qt-creator/qt-creator
Android: Make avd name extraction even more robust
The console output changed even more and now it add one more "OK", in order to get the right avd name we should stop searching at last "OK". Task-number: QTCREATORBUG-16783 Change-Id: I2b69763bba740b739e3573fdfae6b6ac9ed16e95 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
@@ -922,8 +922,10 @@ QString AndroidConfig::getAvdName(const QString &serialnumber)
|
||||
// The input "avd name" might not be echoed as-is, but contain ASCII
|
||||
// control sequences.
|
||||
for (int i = response.size() - 1; i > 1; --i) {
|
||||
if (response.at(i).startsWith("OK"))
|
||||
if (response.at(i).startsWith("OK")) {
|
||||
name = response.at(i - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return QString::fromLatin1(name).trimmed();
|
||||
}
|
||||
|
Reference in New Issue
Block a user