* @brief Stops every active module and exits the application event loop. */
| 337 | * @brief Stops every active module and exits the application event loop. |
| 338 | */ |
| 339 | void Misc::ModuleManager::onQuit() |
| 340 | { |
| 341 | if (m_quitHandled) |
| 342 | return; |
| 343 | |
| 344 | m_quitHandled = true; |
| 345 | |
| 346 | qInstallMessageHandler(nullptr); |
| 347 | |
| 348 | DataModel::ControlScript::instance().shutdown(); |
| 349 | |
| 350 | Misc::ExtensionManager::instance().stopAllPlugins(); |
| 351 | Misc::TimerEvents::instance().stopTimers(); |
| 352 | |
| 353 | DataModel::ProjectModel::instance().flushAutoSave(); |
| 354 | |
| 355 | CSV::Export::instance().closeFile(); |
| 356 | CSV::Player::instance().closeFile(); |
| 357 | MDF4::Export::instance().closeFile(); |
| 358 | #ifdef BUILD_COMMERCIAL |
| 359 | Sessions::Export::instance().closeFile(); |
| 360 | Sessions::Player::instance().closeFile(); |
| 361 | Sessions::Player::instance().shutdown(); |
| 362 | Sessions::DatabaseManager::instance().closeDatabase(false); |
| 363 | Sessions::DatabaseManager::instance().shutdown(); |
| 364 | #endif |
| 365 | IO::ConnectionManager::instance().disconnectAllDevices(); |
| 366 | API::Server::instance().removeConnection(); |
| 367 | |
| 368 | #ifdef ENABLE_GRPC |
| 369 | API::GRPC::GRPCServer::instance().setEnabled(false); |
| 370 | #endif |
| 371 | |
| 372 | Misc::CrashTracker::instance().markCleanExit(); |
| 373 | |
| 374 | qApp->exit(0); |
| 375 | } |
| 376 | |
| 377 | //-------------------------------------------------------------------------------------------------- |
| 378 | // Updater configuration |
nothing calls this directly
no test coverage detected