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

Method closeResources

app/src/Console/Export.cpp:95–109  ·  view source on GitHub ↗

* @brief Closes all per-device output files. */

Source from the content-addressed store, hash-verified

93 * @brief Closes all per-device output files.
94 */
95void Console::ExportWorker::closeResources()
96{
97 bool wasOpen = isResourceOpen();
98 for (auto& [id, state] : m_deviceFiles) {
99 if (state.file && state.file->isOpen()) {
100 state.stream.reset();
101 state.file->close();
102 }
103 }
104
105 m_deviceFiles.clear();
106
107 if (wasOpen)
108 Q_EMIT resourceOpenChanged();
109}
110
111/**
112 * @brief Creates a new console log file for the given device.

Callers

nothing calls this directly

Calls 4

isOpenMethod · 0.45
resetMethod · 0.45
closeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected