forked from qt-creator/qt-creator
Android: Use Utils::InfoLabel in AvdDialog
Task-number: QTCREATORBUG-23346 Change-Id: Iabbad30f4a84d9b2b5cf16ab3e3e1e0cd05eaf8e Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
@@ -56,25 +56,7 @@
|
|||||||
<widget class="QComboBox" name="targetComboBox"/>
|
<widget class="QComboBox" name="targetComboBox"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<widget class="Utils::InfoLabel" name="warningText"/>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="warningIcon">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="warningText">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
@@ -132,6 +114,13 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>Utils::InfoLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header location="global">utils/infolabel.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
|
@@ -61,7 +61,7 @@ AvdDialog::AvdDialog(int minApiLevel, AndroidSdkManager *sdkManager, const QStri
|
|||||||
m_avdDialog.nameLineEdit->setValidator(v);
|
m_avdDialog.nameLineEdit->setValidator(v);
|
||||||
m_avdDialog.nameLineEdit->installEventFilter(this);
|
m_avdDialog.nameLineEdit->installEventFilter(this);
|
||||||
|
|
||||||
m_avdDialog.warningIcon->setPixmap(Utils::Icons::WARNING.pixmap());
|
m_avdDialog.warningText->setType(Utils::InfoLabel::Warning);
|
||||||
|
|
||||||
updateApiLevelComboBox();
|
updateApiLevelComboBox();
|
||||||
|
|
||||||
@@ -136,18 +136,15 @@ void AvdDialog::updateApiLevelComboBox()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (platforms.isEmpty()) {
|
if (platforms.isEmpty()) {
|
||||||
m_avdDialog.warningIcon->setVisible(true);
|
|
||||||
m_avdDialog.warningText->setVisible(true);
|
m_avdDialog.warningText->setVisible(true);
|
||||||
m_avdDialog.warningText->setText(tr("Cannot create a new AVD. No sufficiently recent Android SDK available.\n"
|
m_avdDialog.warningText->setText(tr("Cannot create a new AVD. No sufficiently recent Android SDK available.\n"
|
||||||
"Install an SDK of at least API version %1.")
|
"Install an SDK of at least API version %1.")
|
||||||
.arg(m_minApiLevel));
|
.arg(m_minApiLevel));
|
||||||
} else if (filteredList.isEmpty()) {
|
} else if (filteredList.isEmpty()) {
|
||||||
m_avdDialog.warningIcon->setVisible(true);
|
|
||||||
m_avdDialog.warningText->setVisible(true);
|
m_avdDialog.warningText->setVisible(true);
|
||||||
m_avdDialog.warningText->setText(tr("Cannot create a AVD for ABI %1. Install an image for it.")
|
m_avdDialog.warningText->setText(tr("Cannot create a AVD for ABI %1. Install an image for it.")
|
||||||
.arg(abi()));
|
.arg(abi()));
|
||||||
} else {
|
} else {
|
||||||
m_avdDialog.warningIcon->setVisible(false);
|
|
||||||
m_avdDialog.warningText->setVisible(false);
|
m_avdDialog.warningText->setVisible(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user