| 577 | } |
| 578 | |
| 579 | void DocumentController::cleanup() |
| 580 | { |
| 581 | Q_D(DocumentController); |
| 582 | |
| 583 | d->shuttingDown = true; |
| 584 | |
| 585 | if (d->fileOpenRecent) |
| 586 | d->fileOpenRecent->saveEntries(KConfigGroup(KSharedConfig::openConfig(), QStringLiteral("Recent Files"))); |
| 587 | |
| 588 | // Close all documents without checking if they should be saved. |
| 589 | // This is because the user gets a chance to save them during MainWindow::queryClose. |
| 590 | const auto documents = openDocuments(); |
| 591 | for (IDocument* doc : documents) { |
| 592 | doc->close(IDocument::Discard); |
| 593 | } |
| 594 | } |
| 595 | |
| 596 | DocumentController::~DocumentController() = default; |
| 597 |
nothing calls this directly
no test coverage detected