forked from qt-creator/qt-creator
Android: Make avd output parsing testable
And add some tests Change-Id: Ife0e0c60f55251a1ac23215055ece8fb01478d59 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -26,8 +26,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "android_global.h"
|
||||
#include "androidsdkpackage.h"
|
||||
#include "androiddeviceinfo.h"
|
||||
#include "androidsdkmanager.h"
|
||||
#include "androidsdkpackage.h"
|
||||
|
||||
#include <projectexplorer/toolchain.h>
|
||||
#include <qtsupport/qtversionmanager.h>
|
||||
@@ -58,31 +59,6 @@ class AndroidSdkManager;
|
||||
class AndroidPluginPrivate;
|
||||
}
|
||||
|
||||
class AndroidDeviceInfo
|
||||
{
|
||||
public:
|
||||
QString serialNumber;
|
||||
QString avdname;
|
||||
QStringList cpuAbi;
|
||||
QString avdTarget;
|
||||
QString avdDevice;
|
||||
QString avdSkin;
|
||||
QString avdSdcardSize;
|
||||
|
||||
int sdk = -1;
|
||||
enum State { OkState, UnAuthorizedState, OfflineState };
|
||||
State state = OfflineState;
|
||||
bool unauthorized = false;
|
||||
enum AndroidDeviceType { Hardware, Emulator };
|
||||
AndroidDeviceType type = Emulator;
|
||||
|
||||
static QStringList adbSelector(const QString &serialNumber);
|
||||
|
||||
bool isValid() const { return !serialNumber.isEmpty() || !avdname.isEmpty(); }
|
||||
bool operator<(const AndroidDeviceInfo &other) const;
|
||||
};
|
||||
using AndroidDeviceInfoList = QList<AndroidDeviceInfo>;
|
||||
|
||||
class CreateAvdInfo
|
||||
{
|
||||
public:
|
||||
@@ -269,8 +245,4 @@ private:
|
||||
bool m_force32bit;
|
||||
};
|
||||
|
||||
QDebug &operator<<(QDebug &stream, const AndroidDeviceInfo &device);
|
||||
|
||||
} // namespace Android
|
||||
|
||||
Q_DECLARE_METATYPE(Android::AndroidDeviceInfo)
|
||||
|
||||
Reference in New Issue
Block a user