From 1ca42e24cba68022bbde5c93da84778dd053cdfa Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Thu, 25 Aug 2016 15:46:50 +0300 Subject: [PATCH] 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 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/android/androidconfigurations.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index ea0b88a6271..b7b17fa59d7 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -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(); }