forked from qt-creator/qt-creator
Utils: Introduce TreeItem::{begin,end}
... and use this to reduce the number of explicit uses of m_children. Despite of being shorter code by itself it is a step towards having an explicit LeafItem object that doesn't explicitly store a(n empty) vector of child nodes. Change-Id: If8db85e2f1134dd1578a78d31235bf57a28f863a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -221,7 +221,7 @@ ToolTipWatchItem::ToolTipWatchItem(TreeItem *item)
|
||||
valueColor = model->data(idx.sibling(idx.row(), 1), Qt::ForegroundRole).value<QColor>();
|
||||
expandable = model->hasChildren(idx);
|
||||
expression = model->data(idx.sibling(idx.row(), 0), Qt::EditRole).toString();
|
||||
foreach (TreeItem *child, item->children())
|
||||
for (TreeItem *child : *item)
|
||||
appendChild(new ToolTipWatchItem(child));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user