Merge remote-tracking branch 'origin/3.5'

Change-Id: Ife5fdcd71b0adc99d4297a28a64515e9e93d7864
This commit is contained in:
Eike Ziller
2015-09-04 09:19:28 +02:00
45 changed files with 10790 additions and 9940 deletions

View File

@@ -62,13 +62,16 @@ using namespace WinRt::Internal::Constants;
static QString extractToolchainPrefix(QString *compilerName)
{
QString prefix;
if (compilerName->endsWith(QLatin1String("-g++"))
|| compilerName->endsWith(QLatin1String("-clang++"))
|| compilerName->endsWith(QLatin1String("-gcc"))
|| compilerName->endsWith(QLatin1String("-clang"))) {
const int idx = compilerName->lastIndexOf(QLatin1Char('-')) + 1;
prefix = compilerName->left(idx);
compilerName->remove(0, idx);
const QStringList candidates = { QLatin1String("g++"), QLatin1String("clang++"),
QLatin1String("gcc"), QLatin1String("clang") };
foreach (const QString &candidate, candidates) {
const QString suffix = Utils::HostOsInfo::withExecutableSuffix(QLatin1Char('-')
+ candidate);
if (compilerName->endsWith(suffix)) {
const int idx = compilerName->lastIndexOf(QLatin1Char('-')) + 1;
prefix = compilerName->left(idx);
compilerName->remove(0, idx);
}
}
return prefix;
}