aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-09-08 11:22:11 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2020-09-08 14:04:13 +0000
commite778283b080047e79aa95240cf4bbc7ab77659a7 (patch)
treeb644d03014dbca202415d5dac2ee302d1e765893
parent92f9502f5680ec6ec00e41deb2ea8f9c1b347423 (diff)
ProjectExplorer: Filter out non-applicable toolchains
... when filling the "parent toolchain" combo box for clang on Windows. We should not offer the user a mingw C compiler as the parent of a clang C++ compiler. Even though it will probably work (as it's mainly there for the sysroot), it's conceptually weird and it blows up the number of entries for no good reason. Change-Id: Ic920993b4ff36f8d8d095392555dc9d27f376878 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index e4ea036d77..2a7a820e17 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -1720,8 +1720,11 @@ void ClangToolChainConfigWidget::updateParentToolChainComboBox()
return;
for (const ToolChain *mingwTC : mingwToolChains()) {
- if (parentId != mingwTC->id())
- m_parentToolchainCombo->addItem(mingwTC->displayName(), mingwTC->id());
+ if (mingwTC->id() == parentId)
+ continue;
+ if (mingwTC->language() != tc->language())
+ continue;
+ m_parentToolchainCombo->addItem(mingwTC->displayName(), mingwTC->id());
}
}