Android: fix misleading warning when creating an AVD

When no system images are installed in the used SDK path,
the warning should point to install a system image because
none are installed instead of blaming the SDK.

Task-number: QTCREATORBUG-24754
Change-Id: Ic3dc6cb25f014f4216fd63636b3b312b14f76e6d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Assam Boudjelthia
2020-10-08 14:27:49 +03:00
parent ce2c18dd68
commit d1a42414c5

View File

@@ -244,13 +244,15 @@ void AvdDialog::updateApiLevelComboBox()
if (installedSystemImages.isEmpty()) {
m_avdDialog.targetApiComboBox->setEnabled(false);
m_avdDialog.warningText->setVisible(true);
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.")
m_avdDialog.warningText->setText(
tr("Cannot create a new AVD. No suitable Android system image is installed.\n"
"Install a system image of at least API version %1 from the SDK Manager tab.")
.arg(m_minApiLevel));
} else if (filteredList.isEmpty()) {
m_avdDialog.targetApiComboBox->setEnabled(false);
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 an AVD for ABI %1. Install a system "
"image for it from the SDK Manager tab first.")
.arg(abi()));
} else {
m_avdDialog.warningText->setVisible(false);