| 751 | } |
| 752 | |
| 753 | void BreakpointModel::save() |
| 754 | { |
| 755 | Q_D(BreakpointModel); |
| 756 | |
| 757 | d->dirty = false; |
| 758 | |
| 759 | auto* const activeSession = ICore::self()->activeSession(); |
| 760 | if (!activeSession) { |
| 761 | qCDebug(DEBUGGER) << "Cannot save breakpoints because there is no active session. " |
| 762 | "KDevelop must be exiting and already past SessionController::cleanup()."; |
| 763 | return; |
| 764 | } |
| 765 | |
| 766 | KConfigGroup breakpoints = activeSession->config()->group(QStringLiteral("Breakpoints")); |
| 767 | breakpoints.writeEntry("number", d->breakpoints.count()); |
| 768 | int i = 0; |
| 769 | for (Breakpoint* b : std::as_const(d->breakpoints)) { |
| 770 | KConfigGroup g = breakpoints.group(QString::number(i)); |
| 771 | b->save(g); |
| 772 | ++i; |
| 773 | } |
| 774 | breakpoints.sync(); |
| 775 | } |
| 776 | |
| 777 | void BreakpointModel::scheduleSave() |
| 778 | { |
nothing calls this directly
no test coverage detected