Commit 47f683f4 authored by Daniel Teske's avatar Daniel Teske

Android Create AVD Dialog: Simpler code

Change-Id: I953ff641f46caedc47551298dd1fedb62008ee92
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 4b9fa4f0
...@@ -453,9 +453,8 @@ bool AndroidConfigurations::createAVD(int minApiLevel) const ...@@ -453,9 +453,8 @@ bool AndroidConfigurations::createAVD(int minApiLevel) const
QDialog d; QDialog d;
Ui::AddNewAVDDialog avdDialog; Ui::AddNewAVDDialog avdDialog;
avdDialog.setupUi(&d); avdDialog.setupUi(&d);
QStringListModel model(sdkTargets(minApiLevel)); avdDialog.targetComboBox->addItems(sdkTargets(minApiLevel));
avdDialog.targetComboBox->setModel(&model); if (!avdDialog.targetComboBox->count()) {
if (!model.rowCount()) {
QMessageBox::critical(0, tr("Error Creating AVD"), QMessageBox::critical(0, tr("Error Creating AVD"),
tr("Cannot create a new AVD. No sufficiently recent Android SDK available.\n" tr("Cannot create a new AVD. No sufficiently recent Android SDK available.\n"
"Please install an SDK of at least API version %1."). "Please install an SDK of at least API version %1.").
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment