forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user