MCPcopy Create free account
hub / github.com/KDE/kdevelop / rowCount

Method rowCount

kdevplatform/debugger/util/treemodel.cpp:126–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126int TreeModel::rowCount(const QModelIndex &parent) const
127{
128 Q_D(const TreeModel);
129
130 TreeItem *parentItem;
131 if (parent.column() > 0)
132 return 0;
133
134 if (!parent.isValid())
135 parentItem = d->root;
136 else
137 parentItem = static_cast<TreeItem*>(parent.internalPointer());
138
139 if(parentItem)
140 return parentItem->childCount();
141 else
142 return 0;
143}
144
145TreeItem* TreeModel::itemForIndex(const QModelIndex& index) const
146{

Callers 5

initMethod · 0.45
testDocumentClearMethod · 0.45
testDocumentSetTextMethod · 0.45

Calls 3

columnMethod · 0.45
isValidMethod · 0.45
childCountMethod · 0.45

Tested by 5

initMethod · 0.36
testDocumentClearMethod · 0.36
testDocumentSetTextMethod · 0.36