QbsProjectManager: Do not set an empty compiler name

If one of the two compiler types in the Kit is not set, leave the
respective value in qbs at its default. Things will likely work anyway,
whereas setting an empty compiler name is guaranteed to break.

Task-number: QTCREATORBUG-17109
Change-Id: I2b4153cb9a9daafb2f57659e16622e00d3921005
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
Christian Kandeler
2016-10-18 17:34:17 +02:00
parent cca8d6f796
commit a97f1bd0bb

View File

@@ -263,8 +263,10 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
if (toolchain.contains(QLatin1String("msvc"))) {
data.insert(QLatin1String(CPP_COMPILERNAME), mainCompilerName);
} else {
data.insert(QLatin1String(CPP_COMPILERNAME), cCompilerName);
data.insert(QLatin1String(CPP_CXXCOMPILERNAME), cxxCompilerName);
if (!cCompilerName.isEmpty())
data.insert(QLatin1String(CPP_COMPILERNAME), cCompilerName);
if (!cxxCompilerName.isEmpty())
data.insert(QLatin1String(CPP_CXXCOMPILERNAME), cxxCompilerName);
}
if (tcC && tcCxx && cFileInfo.absolutePath() != cxxFileInfo.absolutePath()) {