* @brief Flushes remaining data and closes resources; the try/catch is mandatory because this * runs through Qt's event loop, where an escaping exception would cross the dispatch boundary. */
| 109 | * runs through Qt's event loop, where an escaping exception would cross the dispatch boundary. |
| 110 | */ |
| 111 | void close() override |
| 112 | { |
| 113 | try { |
| 114 | processData(); |
| 115 | closeResources(); |
| 116 | } catch (const std::exception& e) { |
| 117 | qWarning() << "[FrameConsumer] Exception during close:" << e.what(); |
| 118 | } catch (...) { |
| 119 | qWarning() << "[FrameConsumer] Unknown exception during close"; |
| 120 | } |
| 121 | |
| 122 | Q_EMIT resourceOpenChanged(); |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * @brief Drains every pending frame without closing resources; keeps the worker reusable and |
no outgoing calls
no test coverage detected