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

Method parent

kdevplatform/language/classmodel/classmodel.cpp:153–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153QModelIndex ClassModel::parent(const QModelIndex& childIndex) const
154{
155 if (!childIndex.isValid())
156 return QModelIndex();
157
158 Node* childNode = static_cast<Node*>(childIndex.internalPointer());
159
160 if (childNode->parent() == m_topNode)
161 return QModelIndex();
162
163 return index(childNode->parent());
164}
165
166QModelIndex ClassModel::index(ClassModelNodes::Node* a_node) const
167{

Callers 3

setShowHeaderMethod · 0.45
removeClassNodeMethod · 0.45
indexMethod · 0.45

Calls 3

QModelIndexClass · 0.50
indexFunction · 0.50
isValidMethod · 0.45

Tested by

no test coverage detected