| 184 | } |
| 185 | |
| 186 | QModelIndex TreeModel::index(int row, int column, const QModelIndex& parent) const { |
| 187 | if (parent.isValid() && parent.column() != 0) |
| 188 | return {}; |
| 189 | |
| 190 | TreeItem* parentItem = getItem(parent); |
| 191 | |
| 192 | TreeItem* childItem = parentItem->child(row); |
| 193 | if (childItem) |
| 194 | return createIndex(row, column, childItem); |
| 195 | else |
| 196 | return {}; |
| 197 | } |
| 198 | |
| 199 | bool TreeModel::insertColumns(int position, int columns, const QModelIndex& parent) { |
| 200 | bool success; |
no test coverage detected