MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / index

Method index

src/plugins/debugger/interface/localtreemodel.cpp:85–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85QModelIndex LocalTreeModel::index(int row, int column, const QModelIndex &parent) const
86{
87 if (!hasIndex(row, column, parent))
88 return QModelIndex();
89
90 LocalTreeItem *parentItem;
91
92 if (!parent.isValid())
93 parentItem = rootItem;
94 else
95 parentItem = static_cast<LocalTreeItem *>(parent.internalPointer());
96
97 LocalTreeItem *childItem = parentItem->child(row);
98 if (childItem)
99 return createIndex(row, column, childItem);
100 return QModelIndex();
101}
102
103QModelIndex LocalTreeModel::parent(const QModelIndex &index) const
104{

Callers 2

appendItemMethod · 0.45
clearMethod · 0.45

Calls 3

childMethod · 0.80
QModelIndexClass · 0.50
isValidMethod · 0.45

Tested by

no test coverage detected