forked from qt-creator/qt-creator
Fix avdmanageroutputparser test
- There is no PLUGIN_DEPENDS for tests, and it wouldn't work anyhow
because of duplicated symbols. It was interpreted as a dependency and
the test disabled because no such target exists.
- Move the platformNameToApiLevel(...) function to
avdmanageroutputparser.h to break the dependency to a lot of Android
support code.
Amends 78da7e2922
Change-Id: I6933684a76e5291d415c72388caa3df2bee7cbfb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
committed by
Alessandro Portale
parent
1e34d6ee22
commit
9bc9fb5a0d
@@ -28,6 +28,7 @@
|
||||
#include "androidconfigurations.h"
|
||||
#include "androidconstants.h"
|
||||
#include "androidmanager.h"
|
||||
#include "avdmanageroutputparser.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -691,7 +692,7 @@ AndroidSdkPackage *SdkManagerOutputParser::parsePlatform(const QStringList &data
|
||||
SdkPlatform *platform = nullptr;
|
||||
GenericPackageData packageData;
|
||||
if (parseAbstractData(packageData, data, 2, "Platform")) {
|
||||
const int apiLevel = AndroidConfig::platformNameToApiLevel(packageData.headerParts.at(1));
|
||||
const int apiLevel = platformNameToApiLevel(packageData.headerParts.at(1));
|
||||
if (apiLevel == -1) {
|
||||
qCDebug(sdkManagerLog) << "Platform: Cannot parse api level:"<< data;
|
||||
return nullptr;
|
||||
@@ -711,7 +712,7 @@ QPair<SystemImage *, int> SdkManagerOutputParser::parseSystemImage(const QString
|
||||
QPair <SystemImage *, int> result(nullptr, -1);
|
||||
GenericPackageData packageData;
|
||||
if (parseAbstractData(packageData, data, 4, "System-image")) {
|
||||
const int apiLevel = AndroidConfig::platformNameToApiLevel(packageData.headerParts.at(1));
|
||||
const int apiLevel = platformNameToApiLevel(packageData.headerParts.at(1));
|
||||
if (apiLevel == -1) {
|
||||
qCDebug(sdkManagerLog) << "System-image: Cannot parse api level:"<< data;
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user