forked from qt-creator/qt-creator
Android: Support "android-desktop" device definitions in AvdDialog
Change-Id: Iec80fe8b46302adeb1308d41da77e0a489c9c95e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -111,6 +111,7 @@ AvdDialog::AvdDialog(QWidget *parent)
|
||||
m_deviceTypeToStringMap.insert(AvdDialog::Automotive, "Automotive");
|
||||
m_deviceTypeToStringMap.insert(AvdDialog::TV, "TV");
|
||||
m_deviceTypeToStringMap.insert(AvdDialog::Wear, "Wear");
|
||||
m_deviceTypeToStringMap.insert(AvdDialog::Desktop, "Desktop");
|
||||
|
||||
parseDeviceDefinitionsList();
|
||||
for (const QString &type : m_deviceTypeToStringMap)
|
||||
@@ -211,6 +212,8 @@ AvdDialog::DeviceType AvdDialog::tagToDeviceType(const QString &type_tag)
|
||||
return AvdDialog::TV;
|
||||
else if (type_tag.contains("android-automotive"))
|
||||
return AvdDialog::Automotive;
|
||||
else if (type_tag.contains("android-desktop"))
|
||||
return AvdDialog::Desktop;
|
||||
else
|
||||
return AvdDialog::PhoneOrTablet;
|
||||
}
|
||||
@@ -225,6 +228,29 @@ void AvdDialog::parseDeviceDefinitionsList()
|
||||
return;
|
||||
}
|
||||
|
||||
/* Example output:
|
||||
Available devices definitions:
|
||||
id: 0 or "automotive_1024p_landscape"
|
||||
Name: Automotive (1024p landscape)
|
||||
OEM : Google
|
||||
Tag : android-automotive-playstore
|
||||
---------
|
||||
id: 1 or "automotive_1080p_landscape"
|
||||
Name: Automotive (1080p landscape)
|
||||
OEM : Google
|
||||
Tag : android-automotive
|
||||
---------
|
||||
id: 2 or "Galaxy Nexus"
|
||||
Name: Galaxy Nexus
|
||||
OEM : Google
|
||||
---------
|
||||
id: 3 or "desktop_large"
|
||||
Name: Large Desktop
|
||||
OEM : Google
|
||||
Tag : android-desktop
|
||||
...
|
||||
*/
|
||||
|
||||
QStringList avdDeviceInfo;
|
||||
|
||||
const auto lines = output.split('\n');
|
||||
|
@@ -33,7 +33,7 @@ public:
|
||||
explicit AvdDialog(QWidget *parent = nullptr);
|
||||
int exec() override;
|
||||
|
||||
enum DeviceType { Phone, Tablet, Automotive, TV, Wear, PhoneOrTablet };
|
||||
enum DeviceType { Phone, Tablet, Automotive, TV, Wear, Desktop, PhoneOrTablet };
|
||||
|
||||
ProjectExplorer::IDevice::Ptr device() const;
|
||||
|
||||
|
Reference in New Issue
Block a user