| 207 | } |
| 208 | |
| 209 | bool TreeModel::insertRows(int position, int rows, const QModelIndex& parent) { |
| 210 | TreeItem* parentItem = getItem(parent); |
| 211 | bool success; |
| 212 | |
| 213 | beginInsertRows(parent, position, position + rows - 1); |
| 214 | success = parentItem->insertChildren(position, rows, rootItem->columnCount()); |
| 215 | endInsertRows(); |
| 216 | |
| 217 | return success; |
| 218 | } |
| 219 | |
| 220 | QModelIndex TreeModel::parent(const QModelIndex& index) const { |
| 221 | if (!index.isValid()) |
no test coverage detected