diff options
Diffstat (limited to 'src/plugins/projectexplorer/kitmanager.cpp')
-rw-r--r-- | src/plugins/projectexplorer/kitmanager.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp index 3f77fee414..1c338d730a 100644 --- a/src/plugins/projectexplorer/kitmanager.cpp +++ b/src/plugins/projectexplorer/kitmanager.cpp @@ -238,12 +238,15 @@ void KitManager::restoreKits() kitsToCheck.clear(); // Remove replacement kits for which the original kit has turned up again. - Utils::erase(resultList, [&resultList](const std::unique_ptr<Kit> &k) { - return k->isReplacementKit() - && contains(resultList, [&k](const std::unique_ptr<Kit> &other) { - return other->id() == k->id() && other != k; - }); - }); + for (auto it = resultList.begin(); it != resultList.end();) { + const auto &k = *it; + if (k->isReplacementKit() && contains(resultList, [&k](const std::unique_ptr<Kit> &other) { + return other->id() == k->id() && other != k; })) { + it = resultList.erase(it); + } else { + ++it; + } + } static const auto kitMatchesAbiList = [](const Kit *kit, const Abis &abis) { const QList<ToolChain *> toolchains = ToolChainKitAspect::toolChains(kit); |