| 244 | } |
| 245 | |
| 246 | bool TreeModel::removeRows(int position, int rows, const QModelIndex& parent) { |
| 247 | TreeItem* parentItem = getItem(parent); |
| 248 | |
| 249 | beginRemoveRows(parent, position, position + rows - 1); |
| 250 | bool success = parentItem->removeChildren(position, rows); |
| 251 | endRemoveRows(); |
| 252 | |
| 253 | return success; |
| 254 | } |
| 255 | |
| 256 | int TreeModel::rowCount(const QModelIndex& parent) const { |
| 257 | const auto* parentItem = getItem(parent); |
no test coverage detected