From ac8ce27bbfc1c12ea2f101b3312860d93e36e6bf Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Fri, 18 Oct 2024 02:13:45 +0300 Subject: [PATCH] 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 Reviewed-by: Jarek Kobus --- src/plugins/android/avddialog.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/android/avddialog.cpp b/src/plugins/android/avddialog.cpp index f02abcde29b..dac9175a614 100644 --- a/src/plugins/android/avddialog.cpp +++ b/src/plugins/android/avddialog.cpp @@ -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.
" - "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.
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);