forked from qt-creator/qt-creator
Android: Fix crash in build step when no Qt version is set in kit
Amends 67df868f5c.
Change-Id: I0b69a394adefedbb80dfe240c4e5b9a89d29b7b2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
@@ -70,6 +70,7 @@
|
||||
#include <memory>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace QtSupport;
|
||||
using namespace Utils;
|
||||
using namespace Android::Internal;
|
||||
|
||||
@@ -534,14 +535,17 @@ void AndroidBuildApkStep::setBuildTargetSdk(const QString &sdk)
|
||||
|
||||
QVariant AndroidBuildApkStep::data(Core::Id id) const
|
||||
{
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(target()->kit());
|
||||
|
||||
if (id == Constants::AndroidNdkPlatform) {
|
||||
if (auto qtVersion = QtKitAspect::qtVersion(target()->kit()))
|
||||
return AndroidConfigurations::currentConfig()
|
||||
.bestNdkPlatformMatch(AndroidManager::minimumSDK(target()), qtVersion).mid(8);
|
||||
return {};
|
||||
}
|
||||
if (id == Constants::NdkLocation)
|
||||
if (id == Constants::NdkLocation) {
|
||||
if (auto qtVersion = QtKitAspect::qtVersion(target()->kit()))
|
||||
return QVariant::fromValue(AndroidConfigurations::currentConfig().ndkLocation(qtVersion));
|
||||
return {};
|
||||
}
|
||||
if (id == Constants::SdkLocation)
|
||||
return QVariant::fromValue(AndroidConfigurations::currentConfig().sdkLocation());
|
||||
if (id == Constants::AndroidABIs)
|
||||
|
||||
Reference in New Issue
Block a user