| 94 | } |
| 95 | |
| 96 | void Model::closeProject() |
| 97 | { |
| 98 | Node* item; |
| 99 | for (int i = 0; i < rootItem->childCount(); ++i) { |
| 100 | item = rootItem->child(i); |
| 101 | QModelIndex index = createIndex(i, 0, item); |
| 102 | int rowCount = item->childCount(); |
| 103 | if (rowCount) { |
| 104 | beginRemoveRows(index, 0, rowCount - 1); |
| 105 | for (int j = 0; j < rowCount; ++j) |
| 106 | item->remove(0); |
| 107 | endRemoveRows(); |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | QModelIndex Model::index(int row, int column, const QModelIndex& parent) const |
| 113 | { |
nothing calls this directly
no test coverage detected