Commit 307aa7b3 authored by Daniel Teske's avatar Daniel Teske

Rename AndroidManager::targetSDK to buildTargetSDK

There are 3 different sdk settings:
- The minimum sdk setting from the AndroidManifest.xml
- The target sdk setting from the AndroidManifest.xml
- The target sdk setting from the project.properties file

The last one is now called buildTargetSDK, since it only affects the
build.

Change-Id: I373d925a45088ff0cf8a8e0b22cf9744e571eeb1
Reviewed-by: default avatarEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
parent 1fee440e
......@@ -96,7 +96,7 @@ void AndroidDeployStep::ctor()
bool AndroidDeployStep::init()
{
m_packageName = AndroidManager::packageName(target());
const QString targetSDK = AndroidManager::targetSDK(target());
const QString targetSDK = AndroidManager::buildTargetSDK(target());
m_targetArch = AndroidManager::targetArch(target());
writeOutput(tr("Please wait, searching for a suitable device for target:%1, ABI:%2").arg(targetSDK).arg(m_targetArch));
......@@ -196,7 +196,7 @@ QVariantMap AndroidDeployStep::toMap() const
void AndroidDeployStep::cleanLibsOnDevice()
{
const QString targetSDK = AndroidManager::targetSDK(target());
const QString targetSDK = AndroidManager::buildTargetSDK(target());
const QString targetArch = AndroidManager::targetArch(target());
int deviceAPILevel = targetSDK.mid(targetSDK.indexOf(QLatin1Char('-')) + 1).toInt();
......@@ -258,7 +258,7 @@ void AndroidDeployStep::kitUpdated(Kit *kit)
void AndroidDeployStep::installQASIPackage(const QString &packagePath)
{
const QString targetArch = AndroidManager::targetArch(target());
const QString targetSDK = AndroidManager::targetSDK(target());
const QString targetSDK = AndroidManager::buildTargetSDK(target());
int deviceAPILevel = targetSDK.mid(targetSDK.indexOf(QLatin1Char('-')) + 1).toInt();
QString deviceSerialNumber = AndroidConfigurations::instance().getDeployDeviceSerialNumber(&deviceAPILevel, targetArch);
if (deviceSerialNumber.isEmpty()) {
......
......@@ -196,7 +196,7 @@ QString AndroidManager::activityName(ProjectExplorer::Target *target)
return activityElem.attribute(QLatin1String("android:name"));
}
QString AndroidManager::targetSDK(ProjectExplorer::Target *target)
QString AndroidManager::buildTargetSDK(ProjectExplorer::Target *target)
{
QVariant v = target->namedSettings(QLatin1String("AndroidManager.TargetSdk"));
if (v.isValid())
......@@ -221,7 +221,7 @@ QString AndroidManager::targetSDK(ProjectExplorer::Target *target)
return AndroidConfigurations::instance().bestMatch(fallback);
}
bool AndroidManager::setTargetSDK(ProjectExplorer::Target *target, const QString &sdk)
bool AndroidManager::setBuildTargetSDK(ProjectExplorer::Target *target, const QString &sdk)
{
updateTarget(target, sdk, applicationName(target));
target->setNamedSettings(QLatin1String("AndroidManager.TargetSdk"), sdk);
......
......@@ -72,8 +72,8 @@ public:
static bool updateDeploymentSettings(ProjectExplorer::Target *target);
static bool bundleQt(ProjectExplorer::Target *target);
static QString targetSDK(ProjectExplorer::Target *target);
static bool setTargetSDK(ProjectExplorer::Target *target, const QString &sdk);
static QString buildTargetSDK(ProjectExplorer::Target *target);
static bool setBuildTargetSDK(ProjectExplorer::Target *target, const QString &sdk);
static QString targetArch(ProjectExplorer::Target *target);
......@@ -86,7 +86,7 @@ public:
static Utils::FileName apkPath(ProjectExplorer::Target *target, BuildType buildType);
static bool createAndroidTemplatesIfNecessary(ProjectExplorer::Target *target);
static void updateTarget(ProjectExplorer::Target *target, const QString &targetSDK,
static void updateTarget(ProjectExplorer::Target *target, const QString &buildTargetSDK,
const QString &name = QString());
static Utils::FileName localLibsRulesFilePath(ProjectExplorer::Target *target);
......
......@@ -161,7 +161,7 @@ bool AndroidPackageCreationStep::init()
if (!AndroidManager::createAndroidTemplatesIfNecessary(target()))
return false;
AndroidManager::updateTarget(target(), AndroidManager::targetSDK(target()), AndroidManager::applicationName(target()));
AndroidManager::updateTarget(target(), AndroidManager::buildTargetSDK(target()), AndroidManager::applicationName(target()));
m_antToolPath = AndroidConfigurations::instance().antToolPath();
m_apkPathUnsigned = AndroidManager::apkPath(target(), AndroidManager::ReleaseBuildUnsigned);
m_apkPathSigned = AndroidManager::apkPath(target(), AndroidManager::ReleaseBuildSigned);
......
......@@ -198,7 +198,7 @@ void AndroidPackageCreationWidget::updateAndroidProjectInfo()
QStringList targets = AndroidConfigurations::instance().sdkTargets(minApiLevel);
m_ui->targetSDKComboBox->addItems(targets);
m_ui->targetSDKComboBox->setCurrentIndex(targets.indexOf(AndroidManager::targetSDK(target)));
m_ui->targetSDKComboBox->setCurrentIndex(targets.indexOf(AndroidManager::buildTargetSDK(target)));
m_qtLibsModel->setAvailableItems(AndroidManager::availableQtLibs(target));
m_qtLibsModel->setCheckedItems(AndroidManager::qtLibs(target));
......@@ -208,7 +208,7 @@ void AndroidPackageCreationWidget::updateAndroidProjectInfo()
void AndroidPackageCreationWidget::setTargetSDK(const QString &sdk)
{
AndroidManager::setTargetSDK(m_step->target(), sdk);
AndroidManager::setBuildTargetSDK(m_step->target(), sdk);
Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(m_step->target()->activeBuildConfiguration());
if (!bc)
return;
......
......@@ -122,7 +122,7 @@ void AndroidQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::En
return;
env.set(QLatin1String("ANDROID_NDK_PLATFORM"),
AndroidConfigurations::instance().bestMatch(AndroidManager::targetSDK(target)));
AndroidConfigurations::instance().bestMatch(AndroidManager::buildTargetSDK(target)));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment