diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-06-30 12:21:38 +0300 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-06-30 10:05:55 +0000 |
commit | 097c9ed48485b5d598c41d50679128c7d26b0411 (patch) | |
tree | ccaba047d50ecdccacdd9b39e598f88bfbb4a706 /src/plugins/android/androidsettingswidget.cpp | |
parent | 518e7970bf686667866323d4405ec41070a53253 (diff) |
Android: remove unnecessary validateNDK function and ticks
The NDK is installed via sdkmanager anyways, and custom NDK paths are
verified upon choosing in the file dialog and rejected if not valid.
Change-Id: I18f876dfacdbc1045679c6b082a500527a933673
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/android/androidsettingswidget.cpp')
-rw-r--r-- | src/plugins/android/androidsettingswidget.cpp | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index a1653969fd7..605646a4176 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -105,7 +105,6 @@ private: void showEvent(QShowEvent *event) override; void validateJdk(); - void validateNdk(); void updateNdkList(); void onSdkPathChanged(); void validateSdk(); @@ -164,9 +163,6 @@ enum AndroidValidation { SdkManagerSuccessfulRow, PlatformSdkInstalledRow, AllEssentialsInstalledRow, - NdkPathExistsRow, - NdkDirStructureRow, - NdkinstallDirOkRow }; enum OpenSslValidation { @@ -384,10 +380,6 @@ AndroidSettingsWidget::AndroidSettingsWidget() "All essential packages installed for all installed Qt versions."); androidValidationPoints[BuildToolsInstalledRow] = tr("Build tools installed."); androidValidationPoints[PlatformSdkInstalledRow] = tr("Platform SDK installed."); - androidValidationPoints[NdkPathExistsRow] = tr("Default Android NDK path exists."); - androidValidationPoints[NdkDirStructureRow] = tr("Default Android NDK directory structure is correct."); - androidValidationPoints[NdkinstallDirOkRow] = tr("Default Android NDK installed into a path without " - "spaces."); m_androidSummary = new SummaryWidget(androidValidationPoints, tr("Android settings are OK."), tr("Android settings have errors."), m_ui.androidDetailsWidget); @@ -446,7 +438,7 @@ AndroidSettingsWidget::AndroidSettingsWidget() this, &AndroidSettingsWidget::onSdkPathChanged); connect(m_ui.ndkListWidget, &QListWidget::currentTextChanged, [this](const QString &ndk) { - validateNdk(); + updateUI(); m_ui.removeCustomNdkButton->setEnabled(m_androidConfig.getCustomNdkList().contains(ndk)); }); connect(m_ui.addCustomNdkButton, &QPushButton::clicked, this, @@ -577,26 +569,6 @@ void AndroidSettingsWidget::validateOpenSsl() updateUI(); } -void AndroidSettingsWidget::validateNdk() -{ - const QListWidgetItem *currentItem = m_ui.ndkListWidget->currentItem(); - const FilePath ndkPath = FilePath::fromString(currentItem ? currentItem->text() : ""); - - m_androidSummary->setPointValid(NdkPathExistsRow, ndkPath.exists()); - - const FilePath ndkPlatformsDir = ndkPath.pathAppended("platforms"); - const FilePath ndkToolChainsDir = ndkPath.pathAppended("toolchains"); - const FilePath ndkSourcesDir = ndkPath.pathAppended("sources/cxx-stl"); - m_androidSummary->setPointValid(NdkDirStructureRow, - ndkPlatformsDir.exists() - && ndkToolChainsDir.exists() - && ndkSourcesDir.exists()); - m_androidSummary->setPointValid(NdkinstallDirOkRow, - ndkPlatformsDir.exists() - && !ndkPlatformsDir.toString().contains(' ')); - updateUI(); -} - void AndroidSettingsWidget::onSdkPathChanged() { auto sdkPath = FilePath::fromUserInput(m_ui.SDKLocationPathChooser->rawPath()); @@ -628,7 +600,6 @@ void AndroidSettingsWidget::validateSdk() m_androidSummary->setPointValid(PlatformSdkInstalledRow, !m_sdkManager.installedSdkPlatforms().isEmpty()); m_androidSummary->setPointValid(AllEssentialsInstalledRow, m_androidConfig.allEssentialsInstalled()); - updateUI(); const bool sdkToolsOk = m_androidSummary->rowsOk({SdkPathExistsRow, SdkPathWritableRow, @@ -653,7 +624,7 @@ void AndroidSettingsWidget::validateSdk() startUpdateAvd(); updateNdkList(); - validateNdk(); + updateUI(); } void AndroidSettingsWidget::openSDKDownloadUrl() |