diff options
Diffstat (limited to 'src/plugins/android/androidsettingswidget.cpp')
-rw-r--r-- | src/plugins/android/androidsettingswidget.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index b6a1df3a60..f9d382ba5e 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -162,7 +162,6 @@ class AndroidSettingsWidget final : public Core::IOptionsPageWidget public: // Todo: This would be so much simpler if it just used Utils::PathChooser!!! AndroidSettingsWidget(); - ~AndroidSettingsWidget() final; private: void showEvent(QShowEvent *event) override; @@ -184,8 +183,6 @@ private: bool isDefaultNdkSelected() const; void validateOpenSsl(); - AndroidSdkManagerWidget *m_sdkManagerWidget = nullptr; - AndroidSdkManager m_sdkManager; Tasking::TaskTreeRunner m_sdkDownloader; bool m_isInitialReloadDone = false; @@ -341,9 +338,6 @@ AndroidSettingsWidget::AndroidSettingsWidget() "If the automatic download fails, Qt Creator proposes to open the download URL\n" "in the system's browser for manual download.")); - - m_sdkManagerWidget = new AndroidSdkManagerWidget(&m_sdkManager, this); - const QMap<int, QString> androidValidationPoints = { { JavaPathExistsAndWritableRow, Tr::tr("JDK path exists and is writable.") }, { SdkPathExistsAndWritableRow, Tr::tr("Android SDK path exists and is writable.") }, @@ -500,8 +494,10 @@ AndroidSettingsWidget::AndroidSettingsWidget() m_androidSummary->setInProgressText("Retrieving packages information"); m_androidProgress->show(); }); - connect(sdkManagerToolButton, &QAbstractButton::clicked, - this, [this] { m_sdkManagerWidget->exec(); }); + connect(sdkManagerToolButton, &QAbstractButton::clicked, this, [this] { + AndroidSdkManagerWidget dialog(&m_sdkManager, this); + dialog.exec(); + }); connect(sdkToolsAutoDownloadButton, &QAbstractButton::clicked, this, &AndroidSettingsWidget::downloadSdk); connect(&m_sdkDownloader, &Tasking::TaskTreeRunner::done, this, [this](Tasking::DoneWith result) { @@ -526,12 +522,6 @@ AndroidSettingsWidget::AndroidSettingsWidget() setOnApply([] { AndroidConfigurations::setConfig(androidConfig()); }); } -AndroidSettingsWidget::~AndroidSettingsWidget() -{ - // Deleting m_sdkManagerWidget will cancel all ongoing and pending sdkmanager operations. - delete m_sdkManagerWidget; -} - void AndroidSettingsWidget::showEvent(QShowEvent *event) { Q_UNUSED(event) |