Revert "ToolChains: Do not list ToolChains removed by the sdktool"

Obviously the patch removes too much.
This reverts commit 9a5f81d96f.

Change-Id: Id6f128a8d72b51d0d1701a0a82377b56e2a314b2
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Eike Ziller
2014-11-25 10:54:47 +01:00
committed by hjk
parent 9b27c9b9f1
commit 4bfe6f9327

View File

@@ -204,17 +204,15 @@ void ToolChainManager::restoreToolChains()
}
readTcs.clear();
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;
});
// Remove TCs configured by the SDK:
foreach (ToolChain *tc, tcsToRegister) {
for (int i = tcsToCheck.count() - 1; i >= 0; --i) {
if (tcsToCheck.at(i)->id() == tc->id()) {
delete tcsToCheck.at(i);
tcsToCheck.removeAt(i);
}
}
}
// Then auto detect
QList<ToolChain *> detectedTcs;