summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2014-11-25 10:54:47 +0100
committerhjk <hjk121@nokiamail.com>2014-11-25 12:30:10 +0100
commit4bfe6f9327687237aaa681aeaf4fda97d7c70de5 (patch)
treead0194df4ca6e8eee1515bc3391b9954faf102c7
parent9b27c9b9f1508cfc4dfea4e6b05fdfd5ad42a7de (diff)
downloadqt-creator-4bfe6f9327687237aaa681aeaf4fda97d7c70de5.tar.gz
Revert "ToolChains: Do not list ToolChains removed by the sdktool"
Obviously the patch removes too much. This reverts commit 9a5f81d96fd81dfeec9edd47c73f74498bc1b897. Change-Id: Id6f128a8d72b51d0d1701a0a82377b56e2a314b2 Reviewed-by: hjk <hjk121@nokiamail.com>
-rw-r--r--src/plugins/projectexplorer/toolchainmanager.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/plugins/projectexplorer/toolchainmanager.cpp b/src/plugins/projectexplorer/toolchainmanager.cpp
index cbf7861488..a1abcdbb2b 100644
--- a/src/plugins/projectexplorer/toolchainmanager.cpp
+++ b/src/plugins/projectexplorer/toolchainmanager.cpp
@@ -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;