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 <bogdan@kde.org>
This commit is contained in:
Daniel Teske
2015-01-27 18:46:40 +01:00
parent 5442d144b6
commit e7b90b8681
15 changed files with 193 additions and 66 deletions

View File

@@ -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)