Changeset View
Changeset View
Standalone View
Standalone View
shell/core.cpp
Show First 20 Lines • Show All 423 Lines • ▼ Show 20 Line(s) | |||||
424 | void Core::cleanup() | 424 | void Core::cleanup() | ||
425 | { | 425 | { | ||
426 | qCDebug(SHELL); | 426 | qCDebug(SHELL); | ||
427 | 427 | | |||
428 | d->m_shuttingDown = true; | 428 | d->m_shuttingDown = true; | ||
429 | emit aboutToShutdown(); | 429 | emit aboutToShutdown(); | ||
430 | 430 | | |||
431 | if (!d->m_cleanedUp) { | 431 | if (!d->m_cleanedUp) { | ||
432 | // first of all: stop background jobs | 432 | // first of all: request stop of all background parser jobs | ||
433 | d->languageController->backgroundParser()->abortAllJobs(); | 433 | d->languageController->backgroundParser()->abortAllJobs(); | ||
434 | d->languageController->backgroundParser()->suspend(); | 434 | d->languageController->backgroundParser()->suspend(); | ||
435 | 435 | | |||
436 | d->debugController.data()->cleanup(); | 436 | d->debugController.data()->cleanup(); | ||
437 | d->selectionController.data()->cleanup(); | 437 | d->selectionController.data()->cleanup(); | ||
438 | // Save the layout of the ui here, so run it first | 438 | // Save the layout of the ui here, so run it first | ||
439 | d->uiController.data()->cleanup(); | 439 | d->uiController.data()->cleanup(); | ||
440 | 440 | | |||
441 | if (d->workingSetController) | 441 | if (d->workingSetController) | ||
442 | d->workingSetController.data()->cleanup(); | 442 | d->workingSetController.data()->cleanup(); | ||
443 | 443 | | |||
444 | /* Must be called before projectController.data()->cleanup(). */ | 444 | /* Must be called before projectController.data()->cleanup(). */ | ||
445 | // Closes all documents (discards, as already saved if the user wished earlier) | 445 | // Closes all documents (discards, as already saved if the user wished earlier) | ||
446 | d->documentController.data()->cleanup(); | 446 | d->documentController.data()->cleanup(); | ||
447 | d->runController.data()->cleanup(); | 447 | d->runController.data()->cleanup(); | ||
448 | if (d->partController) { | 448 | if (d->partController) { | ||
449 | d->partController->cleanup(); | 449 | d->partController->cleanup(); | ||
450 | } | 450 | } | ||
451 | d->projectController.data()->cleanup(); | 451 | d->projectController.data()->cleanup(); | ||
452 | d->sourceFormatterController.data()->cleanup(); | 452 | d->sourceFormatterController.data()->cleanup(); | ||
453 | | ||||
454 | // before unloading language plugins, we need to make sure all parse jobs are done | ||||
455 | d->languageController->backgroundParser()->waitForIdle(); | ||||
453 | d->pluginController.data()->cleanup(); | 456 | d->pluginController.data()->cleanup(); | ||
457 | | ||||
454 | d->sessionController.data()->cleanup(); | 458 | d->sessionController.data()->cleanup(); | ||
455 | 459 | | |||
456 | d->testController.data()->cleanup(); | 460 | d->testController.data()->cleanup(); | ||
457 | 461 | | |||
458 | //Disable the functionality of the language controller | 462 | //Disable the functionality of the language controller | ||
459 | d->languageController.data()->cleanup(); | 463 | d->languageController.data()->cleanup(); | ||
460 | 464 | | |||
461 | DUChain::self()->shutdown(); | 465 | DUChain::self()->shutdown(); | ||
▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines |