ProjectExplorer: Do not treat C++ toolchain as C

In case when both use the same compiler command that
could become a problem because they differ only in
the language version.

Change-Id: I8d384b45bae4fecf672ff2b03085fd87a5fc2974
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ivan Donchevskii
2019-01-07 12:18:46 +01:00
parent abb4aea171
commit 773a6e1b42

View File

@@ -968,8 +968,9 @@ QList<ToolChain *> GccToolChainFactory::autoDetectToolchains(const FileName &com
if (compilerPath.isEmpty())
return result;
result = Utils::filtered(alreadyKnown, [requiredTypeId, compilerPath](ToolChain *tc) {
return tc->typeId() == requiredTypeId && tc->compilerCommand() == compilerPath;
result = Utils::filtered(alreadyKnown, [=](ToolChain *tc) {
return tc->typeId() == requiredTypeId && tc->compilerCommand() == compilerPath
&& tc->language() == language;
});
if (!result.isEmpty()) {
for (ToolChain *tc : result) {