Android: Fix filling Target combobox inside New AVD dialog

Remove local instance of AndroidSdkManager from AvdDialog
and use the global one instead.

Call explicitly refreshPackages on Dialog creation.

Amends ca8e5dbb4e

Change-Id: I63d3917cb656bcc9b536e49915cf98cbb543358c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Jarek Kobus
2024-10-28 12:51:20 +01:00
parent b3f0356eb3
commit 56b88ab758
2 changed files with 3 additions and 2 deletions

View File

@@ -42,6 +42,7 @@ AvdDialog::AvdDialog(QWidget *parent)
: QDialog(parent)
, m_allowedNameChars(QLatin1String("[a-z|A-Z|0-9|._-]*"))
{
AndroidConfigurations::sdkManager()->refreshPackages();
resize(800, 0);
setWindowTitle(Tr::tr("Create new AVD"));
@@ -302,7 +303,8 @@ int AvdDialog::sdcardSize() const
void AvdDialog::updateApiLevelComboBox()
{
SystemImageList installedSystemImages = m_sdkManager.installedSystemImages();
const SystemImageList installedSystemImages
= AndroidConfigurations::sdkManager()->installedSystemImages();
DeviceType curDeviceType = m_deviceTypeToStringMap.key(
m_deviceDefinitionTypeComboBox->currentText());

View File

@@ -61,7 +61,6 @@ private:
QTimer m_hideTipTimer;
QRegularExpression m_allowedNameChars;
QList<DeviceDefinitionStruct> m_deviceDefinitionsList;
AndroidSdkManager m_sdkManager;
QMap<AvdDialog::DeviceType, QString> m_deviceTypeToStringMap;
QComboBox *m_abiComboBox;