MCPcopy Create free account
hub / github.com/KDE/kdevelop / cleanup

Method cleanup

kdevplatform/shell/documentcontroller.cpp:579–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577}
578
579void 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
596DocumentController::~DocumentController() = default;
597

Callers

nothing calls this directly

Calls 2

KConfigGroupClass · 0.70
closeMethod · 0.45

Tested by

no test coverage detected