forked from qt-creator/qt-creator
QtOptionsPageWidget::validInformation(): Use ToolChainManager::toolChain()
Use a predicate to check whether any toolchain can be found instead of searching through all of them. Change-Id: I6d4417c548b37629dc43c11e313250c24777a5ca Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -389,8 +389,15 @@ QtOptionsPageWidget::ValidityInfo QtOptionsPageWidget::validInformation(const Ba
|
||||
// Do we have tool chain issues?
|
||||
QList<Abi> missingToolChains;
|
||||
const QList<Abi> qtAbis = version->qtAbis();
|
||||
|
||||
for (const Abi &abi : qtAbis) {
|
||||
if (ToolChainManager::findToolChains(abi).isEmpty())
|
||||
const auto abiCompatePred = [&abi] (const ToolChain *tc)
|
||||
{
|
||||
return Utils::contains(tc->supportedAbis(),
|
||||
[&abi](const Abi &sabi) { return sabi.isCompatibleWith(abi); });
|
||||
};
|
||||
|
||||
if (!ToolChainManager::toolChain(abiCompatePred))
|
||||
missingToolChains.append(abi);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user