Android: Simplify SDK setup process by minimizing number of dialogs

SDK setup process currently downloads the SDK tools, then checks
the mandatory packages, asks the user if they want to install them,
then show a dialog with package details, then asks again whether
the user wants to check the licenses.

The following two steps are redundant because there's a dialog which
guards the package installation and waits for user's input:
* Asking the user if they want to install the mandatory packages
* Asking the user if they want to verify the licenses

Change-Id: If06c0adea9444107a149c3ec32be67061954d1bb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Assam Boudjelthia
2022-01-30 11:37:39 +02:00
parent 4a228ab764
commit ef003ba769
3 changed files with 18 additions and 31 deletions

View File

@@ -544,14 +544,9 @@ void AndroidSettingsWidget::validateSdk()
AllEssentialsInstalledRow});
m_androidConfig.setSdkFullyConfigured(sdkToolsOk && componentsOk);
if (sdkToolsOk && !componentsOk) {
// Ask user to install essential SDK components. Works only for sdk tools version >= 26.0.0
QString message = tr("Android SDK installation is missing necessary packages. Do you "
"want to install the missing packages?");
auto userInput = QMessageBox::information(this, tr("Missing Android SDK Packages"),
message, QMessageBox::Yes | QMessageBox::No);
if (userInput == QMessageBox::Yes) {
m_sdkManagerWidget->installEssentials();
}
m_sdkManagerWidget->installEssentials(
"Android SDK installation is missing necessary packages. "
"Do you want to install the missing packages?");
}
updateNdkList();