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

Method freeDebuggerConsoleForView

ui/statusbar.cpp:161–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159
160
161void DebuggerStatusBarContainer::freeDebuggerConsoleForView(QObject* obj)
162{
163 // A old-style cast must be used here since qobject_cast will fail because
164 // the object is on the brink of deletion.
165 auto* vf = (ViewFrame*)obj;
166
167 // Confirm there is a record of this view.
168 if (!m_consoleMap.count(vf))
169 {
170 LogWarn("Attempted to free DebuggerConsole for untracked view %p", obj);
171 return;
172 }
173
174 auto* console = m_consoleMap[vf];
175 m_consoleStack->removeWidget(console);
176 m_consoleMap.remove(vf);
177
178 // Must be called so the ChatBox is guaranteed to be destroyed. If two
179 // instances for the same view/database exist, things will break.
180 console->deleteLater();
181}
182
183
184void DebuggerStatusBarContainer::notifyViewChanged(ViewFrame* frame)

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected