Commit cf5ec760 authored by Daniel Teske's avatar Daniel Teske

Android: Give Create Avd dialog a proper parent

Change-Id: I0e57d83526dff0edb435f9d81b18e22d4ee26e08
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent ee909267
......@@ -496,9 +496,9 @@ QVector<AndroidDeviceInfo> AndroidConfigurations::connectedDevices(QString *erro
return devices;
}
QString AndroidConfigurations::createAVD(int minApiLevel, QString targetArch) const
QString AndroidConfigurations::createAVD(QWidget *parent, int minApiLevel, QString targetArch) const
{
QDialog d;
QDialog d(parent);
Ui::AddNewAVDDialog avdDialog;
avdDialog.setupUi(&d);
// NOTE: adb list targets does actually include information on which abis are supported per apilevel
......
......@@ -101,7 +101,7 @@ public:
Utils::FileName zipalignPath() const;
Utils::FileName stripPath(ProjectExplorer::Abi::Architecture architecture, const QString &ndkToolChainVersion) const;
Utils::FileName readelfPath(ProjectExplorer::Abi::Architecture architecture, const QString &ndkToolChainVersion) const;
QString createAVD(int minApiLevel = 0, QString targetArch = QString()) const;
QString createAVD(QWidget *parent, int minApiLevel = 0, QString targetArch = QString()) const;
QString createAVD(const QString &target, const QString &name, const QString &abi, int sdcardSize) const;
bool removeAVD(const QString &name) const;
QVector<AndroidDeviceInfo> connectedDevices(QString *error = 0) const;
......
......@@ -446,7 +446,7 @@ void AndroidDeviceDialog::refreshDeviceList()
void AndroidDeviceDialog::createAvd()
{
QString avd = AndroidConfigurations::instance().createAVD(m_apiLevel, m_abi);
QString avd = AndroidConfigurations::instance().createAVD(this, m_apiLevel, m_abi);
if (avd.isEmpty())
return;
refreshDeviceList();
......
......@@ -402,7 +402,7 @@ void AndroidSettingsWidget::browseOpenJDKLocation()
void AndroidSettingsWidget::addAVD()
{
AndroidConfigurations::instance().createAVD();
AndroidConfigurations::instance().createAVD(this);
m_AVDModel.setAvdList(AndroidConfigurations::instance().androidVirtualDevices());
avdActivated(m_ui->AVDTableView->currentIndex());
}
......
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