diff options
author | Vikas Pachdha <vikas.pachdha@qt.io> | 2017-04-03 11:11:17 +0200 |
---|---|---|
committer | Vikas Pachdha <vikas.pachdha@qt.io> | 2017-04-12 13:42:10 +0000 |
commit | 70be880bcb7a832d9bb4fa87d9745b95a5498411 (patch) | |
tree | 1482124aabf4328389150973eb391deee9ef653b /src/plugins/android/avddialog.cpp | |
parent | 05b77e84681db3c225e8849d4312eb5da699235d (diff) | |
download | qt-creator-70be880bcb7a832d9bb4fa87d9745b95a5498411.tar.gz |
Android: Use avdmanager tool
android tool is deprecated since sdk tools version 25.3.0.
Use the new avdmanager tool
Task-number: QTCREATORBUG-17814
Change-Id: Id6f495f14e12d0069df08164cac1929b76d9e932
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src/plugins/android/avddialog.cpp')
-rw-r--r-- | src/plugins/android/avddialog.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/android/avddialog.cpp b/src/plugins/android/avddialog.cpp index c003db7f98..eb7da93e90 100644 --- a/src/plugins/android/avddialog.cpp +++ b/src/plugins/android/avddialog.cpp @@ -68,12 +68,12 @@ AvdDialog::AvdDialog(int minApiLevel, const QString &targetArch, const AndroidCo bool AvdDialog::isValid() const { - return !name().isEmpty() && !target().isEmpty() && !abi().isEmpty(); + return !name().isEmpty() && target().isValid() && !abi().isEmpty(); } -QString AvdDialog::target() const +SdkPlatform AvdDialog::target() const { - return m_avdDialog.targetComboBox->currentText(); + return m_avdDialog.targetComboBox->currentData().value<SdkPlatform>(); } QString AvdDialog::name() const @@ -93,8 +93,8 @@ int AvdDialog::sdcardSize() const void AvdDialog::updateApiLevelComboBox() { - QList<SdkPlatform> filteredList; - QList<SdkPlatform> platforms = m_config->sdkTargets(m_minApiLevel); + SdkPlatformList filteredList; + SdkPlatformList platforms = m_config->sdkTargets(m_minApiLevel); QString selectedAbi = abi(); auto hasAbi = [selectedAbi](const SystemImage &image) { @@ -106,7 +106,10 @@ void AvdDialog::updateApiLevelComboBox() }); m_avdDialog.targetComboBox->clear(); - m_avdDialog.targetComboBox->addItems(AndroidConfig::apiLevelNamesFor(filteredList)); + foreach (const SdkPlatform &platform, filteredList) { + m_avdDialog.targetComboBox->addItem(AndroidConfig::apiLevelNameFor(platform), + QVariant::fromValue<SdkPlatform>(platform)); + } if (platforms.isEmpty()) { m_avdDialog.warningIcon->setVisible(true); |