From 773a6e1b425e76e1b18764700129b885e5b31ece Mon Sep 17 00:00:00 2001 From: Ivan Donchevskii Date: Mon, 7 Jan 2019 12:18:46 +0100 Subject: [PATCH] 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 --- src/plugins/projectexplorer/gcctoolchain.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index c4268760b38..b834a5809b9 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -968,8 +968,9 @@ QList 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) {