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

Method shutdownDrivers

app/src/IO/ConnectionManager.cpp:871–888  ·  view source on GitHub ↗

* @brief Destroys the device managers and UI drivers. main() calls this after the QML * engine is destroyed (a live engine re-evaluates every driver binding against * null and floods the log with TypeErrors) but while QApplication is still * alive, so worker threads join cleanly instead of during static destruction. */

Source from the content-addressed store, hash-verified

869 * alive, so worker threads join cleanly instead of during static destruction.
870 */
871void IO::ConnectionManager::shutdownDrivers()
872{
873 disconnectAllDevices();
874 m_devices.clear();
875
876 m_uartUi.reset();
877 m_networkUi.reset();
878 m_bluetoothLEUi.reset();
879#ifdef BUILD_COMMERCIAL
880 m_audioUi.reset();
881 m_canBusUi.reset();
882 m_hidUi.reset();
883 m_mqttUi.reset();
884 m_modbusUi.reset();
885 m_processUi.reset();
886 m_usbUi.reset();
887#endif
888}
889
890/**
891 * @brief Connects the device with the given @p deviceId.

Callers 1

mainFunction · 0.80

Calls 2

clearMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected