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

Method index

kdevplatform/language/classmodel/classmodel.cpp:138–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138QModelIndex ClassModel::index(int row, int column, const QModelIndex& parent) const
139{
140 if (row < 0 || column != 0)
141 return QModelIndex();
142
143 Node* node = m_topNode;
144 if (parent.isValid())
145 node = static_cast<Node*>(parent.internalPointer());
146
147 if (row >= node->children().size())
148 return QModelIndex();
149
150 return index(node->children()[row]);
151}
152
153QModelIndex ClassModel::parent(const QModelIndex& childIndex) const
154{

Callers

nothing calls this directly

Calls 8

createIndexFunction · 0.85
QModelIndexClass · 0.50
indexFunction · 0.50
isValidMethod · 0.45
sizeMethod · 0.45
childrenMethod · 0.45
parentMethod · 0.45
rowMethod · 0.45

Tested by

no test coverage detected