Commit 9a5f81d9 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

ToolChains: Do not list ToolChains removed by the sdktool

Remove ToolChains removed by the sdktool from user settings. This
prevents them from being created again.

Task-number: QTCREATORBUG-12751
Change-Id: I61b77acb6ab12815d3b09bd766ba44301c517aed
Reviewed-by: default avatarTobias Hunger <>
parent 8f68b7cc
......@@ -204,15 +204,17 @@ void ToolChainManager::restoreToolChains()
// Remove TCs configured by the SDK:
foreach (ToolChain *tc, tcsToRegister) {
for (int i = tcsToCheck.count() - 1; i >= 0; --i) {
if (>id() == tc->id()) {
Utils::erase(tcsToCheck, [tcsToRegister](ToolChain *toCheck) -> bool {
// Remove TCs configured by the SDK and found in the user settings:
if (Utils::anyOf(tcsToRegister, Utils::equal(&ToolChain::id, toCheck->id())))
return true;
// Remove TCs from user settings that are no longer configured by the SDK:
if (toCheck->detection() == ToolChain::AutoDetectionFromSettings
&& !Utils::anyOf(tcsToRegister, Utils::equal(&ToolChain::id, toCheck->id())))
return true;
return false;
// Then auto detect
QList<ToolChain *> detectedTcs;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment