QbsProjectManager: Fix compiler name setup for GCC-like toolchains

The mapping was not quite right. In particular, cpp.cCompilerName needs
to be set if the compiler name is not the default.

Task-number: QTCREATORBUG-19467
Change-Id: I6c190fdda98ff15dce6066bfb082d24853538a78
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
Christian Kandeler
2017-12-19 14:52:30 +01:00
parent b2052561cc
commit 265d093c36
2 changed files with 4 additions and 1 deletions

View File

@@ -296,8 +296,10 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
if (toolchain.contains(QLatin1String("msvc"))) {
data.insert(QLatin1String(CPP_COMPILERNAME), mainCompilerName);
} else {
if (!mainCompilerName.isEmpty())
data.insert(QLatin1String(CPP_COMPILERNAME), mainCompilerName);
if (!cCompilerName.isEmpty())
data.insert(QLatin1String(CPP_COMPILERNAME), cCompilerName);
data.insert(QLatin1String(CPP_CCOMPILERNAME), cCompilerName);
if (!cxxCompilerName.isEmpty())
data.insert(QLatin1String(CPP_CXXCOMPILERNAME), cxxCompilerName);
}