Utils: Add a TypeTreeItem::forFirstLevelChildren iterating function

More typesafety.

Change-Id: Ica50e1c38f6c5d7d3545b588c698f0cbb5775672
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2016-06-17 11:37:16 +02:00
parent a6d21cc1f7
commit 441b81b2b3

View File

@@ -166,6 +166,11 @@ public:
return TreeItem::forAllChildren<ChildType *, Predicate>(pred);
}
template <typename Predicate>
void forFirstLevelChildren(Predicate pred) const {
return TreeItem::forFirstLevelChildren<ChildType *, Predicate>(pred);
}
template <typename Predicate>
ChildType *findFirstLevelChild(Predicate pred) const {
return TreeItem::findFirstLevelChild<ChildType *, Predicate>(pred);