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:
hjk
2017-02-07 08:53:00 +01:00
parent af54ab960a
commit 196dbbe0e7
16 changed files with 75 additions and 66 deletions

View File

@@ -273,7 +273,7 @@ static ThreadItem *itemForThreadId(const ThreadsHandler *handler, ThreadId threa
static int indexForThreadId(const ThreadsHandler *handler, ThreadId threadId)
{
ThreadItem *item = itemForThreadId(handler, threadId);
return item ? handler->rootItem()->children().indexOf(item) : -1;
return item ? handler->rootItem()->indexOf(item) : -1;
}
int ThreadsHandler::currentThreadIndex() const