Move sdkmanager's sdk level parsing to AndroidConfig

Both the sdkmanger and avdmanager (maybe more) need to parse the sdk
level for packages and devices which may contain letters, make them
use the same logic.

Change-Id: Iff7fef3a66e00fac11b833f73f2f334a4cf1a766
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Assam Boudjelthia
2021-09-05 19:44:16 +03:00
parent e1a69fccb1
commit 78da7e2922
5 changed files with 30 additions and 25 deletions

View File

@@ -24,6 +24,7 @@
****************************************************************************/
#include "avdmanageroutputparser.h"
#include "androidconfigurations.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/algorithm.h>
@@ -97,7 +98,7 @@ static Utils::optional<AndroidDeviceInfo> parseAvd(const QStringList &deviceInfo
QSettings avdInfo(avdInfoFile.toString(), QSettings::IniFormat);
value = avdInfo.value(avdInfoTargetKey).toString();
if (!value.isEmpty())
avd.sdk = value.section('-', -1).toInt();
avd.sdk = AndroidConfig::platformNameToApiLevel(value);
else
qCDebug(avdOutputParserLog)
<< "Avd Parsing: Cannot find sdk API:" << avdInfoFile.toString();