MCPcopy Create free account
hub / github.com/Vector35/debugger / freeWidgetForView

Method freeWidgetForView

ui/moduleswidget.cpp:629–649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627
628
629void GlobalDebugModulesContainer::freeWidgetForView(QObject* obj)
630{
631 // A old-style cast must be used here since qobject_cast will fail because
632 // the object is on the brink of deletion.
633 auto* vf = (ViewFrame*)obj;
634
635 // Confirm there is a record of this view.
636 if (!m_widgetMap.count(vf))
637 {
638 LogWarn("Attempted to free DebuggerConsole for untracked view %p", obj);
639 return;
640 }
641
642 auto* console = m_widgetMap[vf];
643 m_consoleStack->removeWidget(console);
644 m_widgetMap.remove(vf);
645
646 // Must be called so the ChatBox is guaranteed to be destoryed. If two
647 // instances for the same view/database exist, things will break.
648 console->deleteLater();
649}
650
651
652void GlobalDebugModulesContainer::notifyViewChanged(ViewFrame* frame)

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected