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

Method cleanup

kdevplatform/shell/core.cpp:420–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418}
419
420void Core::cleanup()
421{
422 qCDebug(SHELL) << "Starting Core cleanup";
423
424 d->m_shuttingDown = true;
425 emit aboutToShutdown();
426
427 if (!d->m_cleanedUp) {
428 // first of all: request stop of all background parser jobs
429 d->languageController->backgroundParser()->abortAllJobs();
430 d->languageController->backgroundParser()->suspend();
431
432 d->debugController->cleanup();
433 d->selectionController->cleanup();
434
435 if (!(d->m_mode & Core::NoUi)) {
436 // Save the layout of the ui here, so run it first
437 d->uiController->cleanup();
438 }
439
440 if (d->workingSetController)
441 d->workingSetController->cleanup();
442
443 /* Must be called before projectController->cleanup(). */
444 // Closes all documents (discards, as already saved if the user wished earlier)
445 d->documentController->cleanup();
446 d->runController->cleanup();
447 if (d->partController) {
448 d->partController->cleanup();
449 }
450 d->projectController->cleanup();
451 d->sourceFormatterController->cleanup();
452
453 // before unloading language plugins, we need to make sure all parse jobs are done
454 d->languageController->backgroundParser()->waitForIdle();
455
456 DUChain::self()->shutdown();
457
458 // Only unload plugins after the DUChain shutdown to prevent issues with non-loaded factories for types
459 // See: https://bugs.kde.org/show_bug.cgi?id=379669
460 d->pluginController->cleanup();
461
462 d->sessionController->cleanup();
463
464 d->testController->cleanup();
465
466 //Disable the functionality of the language controller
467 d->languageController->cleanup();
468 }
469
470 d->m_cleanedUp = true;
471 emit shutdownCompleted();
472}
473
474IUiController *Core::uiController()
475{

Callers

nothing calls this directly

Calls 5

abortAllJobsMethod · 0.80
backgroundParserMethod · 0.80
waitForIdleMethod · 0.80
suspendMethod · 0.45
shutdownMethod · 0.45

Tested by

no test coverage detected