forked from qt-creator/qt-creator
Android: place host abis first in AVD creation wizard
Avoids less switching and it's more practical. Change-Id: Icdc48cee1d3c5a47e054136596732c584bb58a7c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QSpinBox>
|
#include <QSpinBox>
|
||||||
#include <QToolTip>
|
#include <QToolTip>
|
||||||
|
#include <QSysInfo>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
@@ -45,12 +46,24 @@ AvdDialog::AvdDialog(QWidget *parent)
|
|||||||
setWindowTitle(Tr::tr("Create new AVD"));
|
setWindowTitle(Tr::tr("Create new AVD"));
|
||||||
|
|
||||||
m_abiComboBox = new QComboBox;
|
m_abiComboBox = new QComboBox;
|
||||||
m_abiComboBox->addItems({
|
// Put the host architectures on top prioritizing 64 bit
|
||||||
ProjectExplorer::Constants::ANDROID_ABI_X86,
|
const QStringList armAbis = {
|
||||||
ProjectExplorer::Constants::ANDROID_ABI_X86_64,
|
ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A,
|
||||||
ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A,
|
ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A,
|
||||||
ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A
|
};
|
||||||
});
|
|
||||||
|
const QStringList x86Abis = {
|
||||||
|
ProjectExplorer::Constants::ANDROID_ABI_X86_64,
|
||||||
|
ProjectExplorer::Constants::ANDROID_ABI_X86
|
||||||
|
};
|
||||||
|
|
||||||
|
QStringList items;
|
||||||
|
if (QSysInfo::currentCpuArchitecture().startsWith("arm"))
|
||||||
|
items << armAbis << x86Abis;
|
||||||
|
else
|
||||||
|
items << x86Abis << armAbis;
|
||||||
|
|
||||||
|
m_abiComboBox->addItems(items);
|
||||||
|
|
||||||
m_sdcardSizeSpinBox = new QSpinBox;
|
m_sdcardSizeSpinBox = new QSpinBox;
|
||||||
m_sdcardSizeSpinBox->setSuffix(Tr::tr(" MiB"));
|
m_sdcardSizeSpinBox->setSuffix(Tr::tr(" MiB"));
|
||||||
|
Reference in New Issue
Block a user