| 189 | } |
| 190 | |
| 191 | bool Model::removeRows(int row, int count, const QModelIndex& parent) |
| 192 | { |
| 193 | Node* item = nullptr; |
| 194 | if (parent.isValid()) |
| 195 | item = static_cast<Node*>(parent.internalPointer()); |
| 196 | else |
| 197 | return false; |
| 198 | |
| 199 | beginRemoveRows(parent, row, row + count - 1); |
| 200 | while (count--) |
| 201 | item->remove(row); |
| 202 | endRemoveRows(); |
| 203 | resetInternalData(); |
| 204 | return true; |
| 205 | } |
| 206 | |
| 207 | int Model::columnCount(const QModelIndex& /*parent*/) const |
| 208 | { |
no test coverage detected