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

Method clear

app/src/UI/WidgetRegistry.cpp:184–197  ·  view source on GitHub ↗

* @brief Clears all widgets from the registry. */

Source from the content-addressed store, hash-verified

182 * @brief Clears all widgets from the registry.
183 */
184void UI::WidgetRegistry::clear()
185{
186 auto idsToDestroy = m_widgetOrder;
187 std::reverse(idsToDestroy.begin(), idsToDestroy.end());
188
189 for (const auto& id : idsToDestroy) {
190 Q_EMIT widgetDestroyed(id);
191 m_widgets.remove(id);
192 }
193
194 m_widgetOrder.clear();
195
196 Q_EMIT registryCleared();
197}
198
199/**
200 * @brief Destroys a widget and removes it from the registry.

Callers

nothing calls this directly

Calls 3

reverseFunction · 0.85
beginMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected