MCPcopy Create free account
hub / github.com/aldelaro5/dolphin-memory-engine / index

Method index

Source/GUI/StructEditor/StructSelectModel.cpp:78–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78QModelIndex StructSelectModel::index(int row, int column, const QModelIndex& parent) const
79{
80 if (!hasIndex(row, column, parent))
81 return {};
82
83 StructTreeNode* parentNode;
84
85 if (!parent.isValid())
86 parentNode = m_rootNode;
87 else
88 parentNode = static_cast<StructTreeNode*>(parent.internalPointer());
89
90 StructTreeNode* childNode = parentNode->getChildren().at(row);
91 if (childNode)
92 return createIndex(row, column, childNode);
93
94 return {};
95}
96
97QModelIndex StructSelectModel::parent(const QModelIndex& index) const
98{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected