| 136 | } |
| 137 | |
| 138 | QModelIndex 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 | |
| 153 | QModelIndex ClassModel::parent(const QModelIndex& childIndex) const |
| 154 | { |
nothing calls this directly
no test coverage detected