From e7b90b8681f68a889f2da601b42b001111aaef43 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Tue, 27 Jan 2015 18:46:40 +0100 Subject: Android: Set correct ANDROID_NDK_PLATFORM Introduce the class AndroidQmakeBuildConfiguration whose purpose is to set the environment variable. Modify the Factory to create buildconfigurations of that type and fix restore/clone to also take the factories' priorities into account. Change-Id: Icb377fa9211cd3564c36b60cf7c5f7dd84fcab50 Reviewed-by: BogDan Vatra --- src/plugins/android/androidmanager.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/plugins/android/androidmanager.cpp') diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index c80f56d5ed..b5ad731b66 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -149,7 +149,7 @@ QString AndroidManager::activityName(ProjectExplorer::Target *target) int AndroidManager::minimumSDK(ProjectExplorer::Target *target) { QDomDocument doc; - if (!openManifest(target, doc)) + if (!openXmlFile(doc, AndroidManager::manifestSourcePath(target))) return 0; QDomElement manifestElem = doc.documentElement(); QDomElement usesSdk = manifestElem.firstChildElement(QLatin1String("uses-sdk")); @@ -192,7 +192,18 @@ QString AndroidManager::targetArch(ProjectExplorer::Target *target) Utils::FileName AndroidManager::dirPath(ProjectExplorer::Target *target) { - return target->activeBuildConfiguration()->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY)); + if (target->activeBuildConfiguration()) + return target->activeBuildConfiguration()->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY)); + return Utils::FileName(); +} + +Utils::FileName AndroidManager::manifestSourcePath(ProjectExplorer::Target *target) +{ + AndroidQtSupport *androidQtSupport = AndroidManager::androidQtSupport(target); + Utils::FileName source = androidQtSupport->manifestSourcePath(target); + if (!source.isEmpty()) + return source; + return manifestPath(target); } Utils::FileName AndroidManager::manifestPath(ProjectExplorer::Target *target) -- cgit v1.2.1