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>
This commit is contained in:
Christian Kandeler
2020-09-08 11:22:11 +02:00
parent 92f9502f56
commit e778283b08

View File

@@ -1720,7 +1720,10 @@ void ClangToolChainConfigWidget::updateParentToolChainComboBox()
return; return;
for (const ToolChain *mingwTC : mingwToolChains()) { for (const ToolChain *mingwTC : mingwToolChains()) {
if (parentId != mingwTC->id()) if (mingwTC->id() == parentId)
continue;
if (mingwTC->language() != tc->language())
continue;
m_parentToolchainCombo->addItem(mingwTC->displayName(), mingwTC->id()); m_parentToolchainCombo->addItem(mingwTC->displayName(), mingwTC->id());
} }
} }