| 373 | |
| 374 | |
| 375 | void DebugBreakpointsWidget::remove() |
| 376 | { |
| 377 | QModelIndexList sel = selectionModel()->selectedRows(); |
| 378 | std::vector<ModuleNameAndOffset> breakpointsToRemove; |
| 379 | |
| 380 | for (const QModelIndex& index : sel) |
| 381 | { |
| 382 | // We cannot delete the breakpoint inside this loop because deleting a breakpoint will cause this widget to |
| 383 | // remove the breakpoint from the list, which will invalidate the index of the remaining breakpoints. |
| 384 | BreakpointItem bp = m_model->getRow(index.row()); |
| 385 | breakpointsToRemove.push_back(bp.location()); |
| 386 | } |
| 387 | |
| 388 | for (const auto& bp : breakpointsToRemove) |
| 389 | m_controller->DeleteBreakpoint(bp); |
| 390 | } |
| 391 | |
| 392 | |
| 393 | void DebugBreakpointsWidget::updateContent() |
no test coverage detected