Android: add line breaks to new AVD warnings

Change-Id: Ie533c468717674959060c7732952892086f37640
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Assam Boudjelthia
2020-11-03 16:29:09 +02:00
parent 54667ae51c
commit cb34bfc493

View File

@@ -75,6 +75,7 @@ AvdDialog::AvdDialog(int minApiLevel, AndroidSdkManager *sdkManager, const QStri
m_avdDialog.nameLineEdit->installEventFilter(this); m_avdDialog.nameLineEdit->installEventFilter(this);
m_avdDialog.warningText->setType(Utils::InfoLabel::Warning); m_avdDialog.warningText->setType(Utils::InfoLabel::Warning);
m_avdDialog.warningText->setElideMode(Qt::ElideNone);
connect(&m_hideTipTimer, &QTimer::timeout, this, []() { Utils::ToolTip::hide(); }); connect(&m_hideTipTimer, &QTimer::timeout, this, []() { Utils::ToolTip::hide(); });
@@ -246,14 +247,14 @@ void AvdDialog::updateApiLevelComboBox()
m_avdDialog.targetApiComboBox->setEnabled(false); m_avdDialog.targetApiComboBox->setEnabled(false);
m_avdDialog.warningText->setVisible(true); m_avdDialog.warningText->setVisible(true);
m_avdDialog.warningText->setText( m_avdDialog.warningText->setText(
tr("Cannot create a new AVD. No suitable Android system image is installed.\n" tr("Cannot create a new AVD. No suitable Android system image is installed.<br/>"
"Install a system image of at least API version %1 from the SDK Manager tab.") "Install a system image of at least API version %1 from the SDK Manager tab.")
.arg(m_minApiLevel)); .arg(m_minApiLevel));
m_avdDialog.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); m_avdDialog.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
} else if (filteredList.isEmpty()) { } else if (filteredList.isEmpty()) {
m_avdDialog.targetApiComboBox->setEnabled(false); m_avdDialog.targetApiComboBox->setEnabled(false);
m_avdDialog.warningText->setVisible(true); m_avdDialog.warningText->setVisible(true);
m_avdDialog.warningText->setText(tr("Cannot create an AVD for ABI %1. Install a system " m_avdDialog.warningText->setText(tr("Cannot create an AVD for ABI %1.<br/>Install a system "
"image for it from the SDK Manager tab first.") "image for it from the SDK Manager tab first.")
.arg(abi())); .arg(abi()));
m_avdDialog.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); m_avdDialog.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);