forked from qt-creator/qt-creator
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:
@@ -166,6 +166,11 @@ public:
|
|||||||
return TreeItem::forAllChildren<ChildType *, Predicate>(pred);
|
return TreeItem::forAllChildren<ChildType *, Predicate>(pred);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Predicate>
|
||||||
|
void forFirstLevelChildren(Predicate pred) const {
|
||||||
|
return TreeItem::forFirstLevelChildren<ChildType *, Predicate>(pred);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename Predicate>
|
template <typename Predicate>
|
||||||
ChildType *findFirstLevelChild(Predicate pred) const {
|
ChildType *findFirstLevelChild(Predicate pred) const {
|
||||||
return TreeItem::findFirstLevelChild<ChildType *, Predicate>(pred);
|
return TreeItem::findFirstLevelChild<ChildType *, Predicate>(pred);
|
||||||
|
Reference in New Issue
Block a user