summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/debuggeroptionspage.cpp
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2016-05-04 16:41:15 +0200
committerhjk <hjk@theqtcompany.com>2016-05-12 12:30:36 +0000
commitdee7ad3806ffa777c619b832d82186c5bbdfc1b3 (patch)
tree485b011f795152268306dbd48a240dcd9c63d55a /src/plugins/debugger/debuggeroptionspage.cpp
parentaa2e1353795940fdd423c1d756bbd3243244ed70 (diff)
downloadqt-creator-dee7ad3806ffa777c619b832d82186c5bbdfc1b3.tar.gz
TreeModel: Rework tree iteration
Use function objects to apply directly during a depth-first walk of the tree instead of faking a flat container of tree nodes. Less code, and allows even some non-const operations. Change-Id: I804ab11df358fe937b40809cbcb772e6f3ff8dc5 Reviewed-by: David Schulz <david.schulz@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/debugger/debuggeroptionspage.cpp')
-rw-r--r--src/plugins/debugger/debuggeroptionspage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/debugger/debuggeroptionspage.cpp b/src/plugins/debugger/debuggeroptionspage.cpp
index bbed95e4fe..f071ac5ef9 100644
--- a/src/plugins/debugger/debuggeroptionspage.cpp
+++ b/src/plugins/debugger/debuggeroptionspage.cpp
@@ -180,10 +180,10 @@ void DebuggerItemModel::apply()
foreach (const QVariant &id, m_removedItems)
DebuggerItemManager::deregisterDebugger(id);
- foreach (auto item, itemsAtLevel<DebuggerTreeItem *>(2)) {
+ forEachItemAtLevel<DebuggerTreeItem *>(2, [](DebuggerTreeItem *item) {
item->m_changed = false;
DebuggerItemManager::updateOrAddDebugger(item->m_item);
- }
+ });
}
void DebuggerItemModel::setCurrentIndex(const QModelIndex &index)