forked from qt-creator/qt-creator
Fix Android toolchains detection (ndk-r8b).
Change-Id: If0824d859fbf50d76798711642b4996db66cd46f Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
6db108afdd
commit
e73025d0ab
@@ -72,7 +72,7 @@ namespace {
|
|||||||
const QLatin1String OpenJDKLocationKey("OpenJDKLocation");
|
const QLatin1String OpenJDKLocationKey("OpenJDKLocation");
|
||||||
const QLatin1String KeystoreLocationKey("KeystoreLocation");
|
const QLatin1String KeystoreLocationKey("KeystoreLocation");
|
||||||
const QLatin1String PartitionSizeKey("PartitionSize");
|
const QLatin1String PartitionSizeKey("PartitionSize");
|
||||||
const QLatin1String NDKGccVersionRegExp("\\d\\.\\d\\.\\d");
|
const QLatin1String NDKGccVersionRegExp("-\\d[\\.\\d]+");
|
||||||
const QLatin1String ArmToolchainPrefix("arm-linux-androideabi");
|
const QLatin1String ArmToolchainPrefix("arm-linux-androideabi");
|
||||||
const QLatin1String X86ToolchainPrefix("x86");
|
const QLatin1String X86ToolchainPrefix("x86");
|
||||||
const QLatin1String ArmToolsPrefix("arm-linux-androideabi");
|
const QLatin1String ArmToolsPrefix("arm-linux-androideabi");
|
||||||
@@ -138,7 +138,7 @@ AndroidConfig::AndroidConfig(const QSettings &settings)
|
|||||||
if (versionRegExp.exactMatch(value))
|
if (versionRegExp.exactMatch(value))
|
||||||
ndkToolchainVersion = value;
|
ndkToolchainVersion = value;
|
||||||
else
|
else
|
||||||
ndkToolchainVersion = value.mid(versionRegExp.indexIn(value));
|
ndkToolchainVersion = value.mid(versionRegExp.indexIn(value)+1);
|
||||||
// user settings
|
// user settings
|
||||||
|
|
||||||
PersistentSettingsReader reader;
|
PersistentSettingsReader reader;
|
||||||
@@ -156,7 +156,7 @@ AndroidConfig::AndroidConfig(const QSettings &settings)
|
|||||||
if (versionRegExp.exactMatch(value))
|
if (versionRegExp.exactMatch(value))
|
||||||
ndkToolchainVersion = value;
|
ndkToolchainVersion = value;
|
||||||
else
|
else
|
||||||
ndkToolchainVersion = value.mid(versionRegExp.indexIn(value));
|
ndkToolchainVersion = value.mid(versionRegExp.indexIn(value)+1);
|
||||||
|
|
||||||
if (armGdbLocation.isEmpty())
|
if (armGdbLocation.isEmpty())
|
||||||
armGdbLocation = Utils::FileName::fromString(reader.restoreValue(ArmGdbLocationKey).toString());
|
armGdbLocation = Utils::FileName::fromString(reader.restoreValue(ArmGdbLocationKey).toString());
|
||||||
@@ -254,7 +254,7 @@ QStringList AndroidConfigurations::ndkToolchainVersions() const
|
|||||||
int idx = versionRegExp.indexIn(fileName);
|
int idx = versionRegExp.indexIn(fileName);
|
||||||
if (idx == -1)
|
if (idx == -1)
|
||||||
continue;
|
continue;
|
||||||
QString version = fileName.mid(idx);
|
QString version = fileName.mid(idx+1);
|
||||||
if (!result.contains(version))
|
if (!result.contains(version))
|
||||||
result.append(version);
|
result.append(version);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user