Android: reword and reformat the no AVD image warning

Make the warning message shorter and enable elide right,
and place the warning right under the abi combobox.

Change-Id: I0163e5e48cbdf350948297a4b58ec712543516e5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Assam Boudjelthia
2024-10-18 02:13:45 +03:00
parent f4582efd30
commit ac8ce27bbf

View File

@@ -82,7 +82,7 @@ AvdDialog::AvdDialog(QWidget *parent)
m_warningText = new InfoLabel;
m_warningText->setType(InfoLabel::Warning);
m_warningText->setElideMode(Qt::ElideNone);
m_warningText->setElideMode(Qt::ElideRight);
m_deviceDefinitionTypeComboBox = new QComboBox;
@@ -98,8 +98,8 @@ AvdDialog::AvdDialog(QWidget *parent)
Column {
Form {
Tr::tr("Name:"), m_nameLineEdit, br,
Tr::tr("Architecture (ABI):"), m_abiComboBox, br,
Tr::tr("Target API:"), m_targetApiComboBox, br,
Tr::tr("Target ABI / API:"),
Row { m_abiComboBox, m_targetApiComboBox }, br,
QString(), m_warningText, br,
Tr::tr("Skin definition:"),
Row { m_deviceDefinitionTypeComboBox, m_deviceDefinitionComboBox }, br,
@@ -334,19 +334,19 @@ void AvdDialog::updateApiLevelComboBox()
Qt::ToolTipRole);
}
const QString installRecommendationMsg = Tr::tr(
"Install a system image from the SDK Manager first.");
if (installedSystemImages.isEmpty()) {
m_targetApiComboBox->setEnabled(false);
m_warningText->setVisible(true);
m_warningText->setText(
Tr::tr("Cannot create a new AVD. No suitable Android system image is installed.<br/>"
"Install a system image for the intended Android version from the SDK Manager."));
m_warningText->setText(Tr::tr("No system images found.") + " " + installRecommendationMsg);
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
} else if (filteredList.isEmpty()) {
m_targetApiComboBox->setEnabled(false);
m_warningText->setVisible(true);
m_warningText->setText(Tr::tr("Cannot create an AVD for ABI %1.<br/>Install a system "
"image for it from the SDK Manager tab first.")
.arg(abi()));
m_warningText->setText(Tr::tr("No system images found for %1.").arg(abi()) + " " +
installRecommendationMsg);
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
} else {
m_warningText->setVisible(false);