forked from qt-creator/qt-creator
Set proper names and size constraints for elements of addnewavddialog
* Set sdcard size default to 512MB * Add proper names to labels * Default ABI to x86 as it's the recommended by Android Studio Task-number: QTCREATORBUG-23284 Change-Id: I96ad6936b67045282933ebb31fba2c11b8af1d9d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -6,10 +6,22 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>336</width>
|
||||
<height>183</height>
|
||||
<width>600</width>
|
||||
<height>187</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>1024</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Create new AVD</string>
|
||||
</property>
|
||||
@@ -17,25 +29,19 @@
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="nameLabel">
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="nameLineEdit"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<widget class="QLabel" name="abiLabel">
|
||||
<property name="text">
|
||||
<string>ABI:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<string>Architecture (ABI):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -43,33 +49,27 @@
|
||||
<widget class="QComboBox" name="abiComboBox"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<widget class="QLabel" name="targetApiLabel">
|
||||
<property name="text">
|
||||
<string>Target API:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="targetComboBox"/>
|
||||
<widget class="QComboBox" name="targetApiComboBox"/>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="Utils::InfoLabel" name="warningText"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<widget class="QLabel" name="sdcardSizeLabel">
|
||||
<property name="text">
|
||||
<string>SD card size:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="sizeSpinBox">
|
||||
<widget class="QSpinBox" name="sdcardSizeSpinBox">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
@@ -80,10 +80,10 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>9999999</number>
|
||||
<number>1000000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
<number>512</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@@ -51,8 +51,8 @@ AvdDialog::AvdDialog(int minApiLevel, AndroidSdkManager *sdkManager, const QStri
|
||||
m_hideTipTimer.setSingleShot(true);
|
||||
|
||||
if (abis.isEmpty()) {
|
||||
m_avdDialog.abiComboBox->addItems(QStringList({"armeabi-v7a", "armeabi", "x86",
|
||||
"arm64-v8a", "x86_64"}));
|
||||
m_avdDialog.abiComboBox->addItems(QStringList({"x86", "x86_64", "armeabi-v7a",
|
||||
"armeabi", "arm64-v8a"}));
|
||||
} else {
|
||||
m_avdDialog.abiComboBox->addItems(abis);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ CreateAvdInfo AvdDialog::gatherCreateAVDInfo(QWidget *parent, AndroidSdkManager
|
||||
|
||||
const SdkPlatform* AvdDialog::sdkPlatform() const
|
||||
{
|
||||
return m_avdDialog.targetComboBox->currentData().value<SdkPlatform*>();
|
||||
return m_avdDialog.targetApiComboBox->currentData().value<SdkPlatform*>();
|
||||
}
|
||||
|
||||
QString AvdDialog::name() const
|
||||
@@ -110,7 +110,7 @@ QString AvdDialog::abi() const
|
||||
|
||||
int AvdDialog::sdcardSize() const
|
||||
{
|
||||
return m_avdDialog.sizeSpinBox->value();
|
||||
return m_avdDialog.sdcardSizeSpinBox->value();
|
||||
}
|
||||
|
||||
void AvdDialog::updateApiLevelComboBox()
|
||||
@@ -127,11 +127,11 @@ void AvdDialog::updateApiLevelComboBox()
|
||||
return platform && Utils::anyOf(platform->systemImages(), hasAbi);
|
||||
});
|
||||
|
||||
m_avdDialog.targetComboBox->clear();
|
||||
m_avdDialog.targetApiComboBox->clear();
|
||||
for (SdkPlatform *platform: filteredList) {
|
||||
m_avdDialog.targetComboBox->addItem(platform->displayText(),
|
||||
m_avdDialog.targetApiComboBox->addItem(platform->displayText(),
|
||||
QVariant::fromValue<SdkPlatform *>(platform));
|
||||
m_avdDialog.targetComboBox->setItemData(m_avdDialog.targetComboBox->count() - 1,
|
||||
m_avdDialog.targetApiComboBox->setItemData(m_avdDialog.targetApiComboBox->count() - 1,
|
||||
platform->descriptionText(), Qt::ToolTipRole);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user