Android: Remove bestMatch calls in fallback code in buildTargetSDK

besdtMatch finds a ndk version that is at most the targetApi passed into it.
Since we are passing in the fallback and lowest possible api level that qt
supports, the function would return at most the lowest supported version.
That's not very useful and cannot have worked, so simpy return the fallback
version directly.

Change-Id: I5e4757639099af4d207f928b0335d28efd75a02b
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
Daniel Teske
2013-10-17 13:12:55 +02:00
parent c30c290631
commit 5e10114e76

View File

@@ -237,17 +237,17 @@ QString AndroidManager::buildTargetSDK(ProjectExplorer::Target *target)
fallback = QLatin1String("android-9");
if (!createAndroidTemplatesIfNecessary(target))
return AndroidConfigurations::instance().bestMatch(fallback);
return fallback;
QFile file(defaultPropertiesPath(target).toString());
if (!file.open(QIODevice::ReadOnly))
return AndroidConfigurations::instance().bestMatch(fallback);
return fallback;
while (!file.atEnd()) {
QByteArray line = file.readLine();
if (line.startsWith("target="))
return QString::fromLatin1(line.trimmed().mid(7));
}
return AndroidConfigurations::instance().bestMatch(fallback);
return fallback;
}
bool AndroidManager::setBuildTargetSDK(ProjectExplorer::Target *target, const QString &sdk)