From 331358752c074d4dccadc5bd353bb81ed7fb1bdc Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 8 Oct 2019 13:07:06 +0200 Subject: [PATCH] Android: Improve error message for "invalid" Qt versions AndroidQtVersion reports as invalid also if NDK or SDK are not configured, or there are other errors in Devices > Android, so point the user there. Fixes: QTCREATORBUG-23058 Change-Id: Ic81d0663552769f78b0121ee3e1ddfc1f6510c11 Reviewed-by: BogDan Vatra Reviewed-by: Leena Miettinen --- src/plugins/android/androidqtversion.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins/android/androidqtversion.cpp b/src/plugins/android/androidqtversion.cpp index 4b1696ee78f..ff8606a1e0a 100644 --- a/src/plugins/android/androidqtversion.cpp +++ b/src/plugins/android/androidqtversion.cpp @@ -64,8 +64,15 @@ bool AndroidQtVersion::isValid() const QString AndroidQtVersion::invalidReason() const { QString tmp = BaseQtVersion::invalidReason(); - if (tmp.isEmpty() && qtAbis().isEmpty()) - return tr("Failed to detect the ABIs used by the Qt version."); + if (tmp.isEmpty()) { + if (AndroidConfigurations::currentConfig().ndkLocation().isEmpty()) + return tr("NDK is not configured in Devices > Android."); + if (AndroidConfigurations::currentConfig().sdkLocation().isEmpty()) + return tr("SDK is not configured in Devices > Android."); + if (qtAbis().isEmpty()) + return tr("Failed to detect the ABIs used by the Qt version. Check the settings in " + "Devices > Android for errors."); + } return tmp; }