| 278 | } |
| 279 | |
| 280 | auto BootEntryListModel::insertRows(int row, int count, const QModelIndex &parent) -> bool |
| 281 | { |
| 282 | for(int c = 0; c < count; ++c) |
| 283 | { |
| 284 | auto command = new InsertBootEntryCommand{*this, parent, row + c, {}}; |
| 285 | if(!undo_stack) |
| 286 | { |
| 287 | command->redo(); |
| 288 | delete command; |
| 289 | continue; |
| 290 | } |
| 291 | |
| 292 | undo_stack->push(command); |
| 293 | } |
| 294 | |
| 295 | return true; |
| 296 | } |
| 297 | |
| 298 | auto BootEntryListModel::appendRow(const BootEntry &data, const QModelIndex &parent) -> bool |
| 299 | { |