forked from qt-creator/qt-creator
Android Create AVD Dialog: Simpler code
Change-Id: I953ff641f46caedc47551298dd1fedb62008ee92 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -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.").
|
||||||
|
|||||||
Reference in New Issue
Block a user