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

Method ~ConnectionManager

app/src/IO/ConnectionManager.cpp:115–138  ·  view source on GitHub ↗

* @brief Disconnects all UI drivers and tears down active connections. */

Source from the content-addressed store, hash-verified

113 * @brief Disconnects all UI drivers and tears down active connections.
114 */
115IO::ConnectionManager::~ConnectionManager()
116{
117 for (auto* drv : {static_cast<QObject*>(m_uartUi.get()),
118 static_cast<QObject*>(m_networkUi.get()),
119 static_cast<QObject*>(m_bluetoothLEUi.get())}) {
120 if (drv)
121 disconnect(drv, nullptr, this, nullptr);
122 }
123
124#ifdef BUILD_COMMERCIAL
125 for (auto* drv : {static_cast<QObject*>(m_audioUi.get()),
126 static_cast<QObject*>(m_canBusUi.get()),
127 static_cast<QObject*>(m_hidUi.get()),
128 static_cast<QObject*>(m_mqttUi.get()),
129 static_cast<QObject*>(m_modbusUi.get()),
130 static_cast<QObject*>(m_processUi.get()),
131 static_cast<QObject*>(m_usbUi.get())}) {
132 if (drv)
133 disconnect(drv, nullptr, this, nullptr);
134 }
135#endif
136
137 disconnectAllDevices();
138}
139
140/**
141 * @brief Returns the singleton ConnectionManager instance.

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected