MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / onQuit

Method onQuit

app/src/Misc/ModuleManager.cpp:339–375  ·  view source on GitHub ↗

* @brief Stops every active module and exits the application event loop. */

Source from the content-addressed store, hash-verified

337 * @brief Stops every active module and exits the application event loop.
338 */
339void 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

Callers

nothing calls this directly

Calls 10

stopAllPluginsMethod · 0.80
stopTimersMethod · 0.80
flushAutoSaveMethod · 0.80
disconnectAllDevicesMethod · 0.80
removeConnectionMethod · 0.80
markCleanExitMethod · 0.80
shutdownMethod · 0.45
closeFileMethod · 0.45
closeDatabaseMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected