MCPcopy Create free account
hub / github.com/KDE/kdevelop / toolViewRemoved

Method toolViewRemoved

kdevplatform/sublime/idealcontroller.cpp:735–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

733}
734
735void IdealController::toolViewRemoved(const Document* document)
736{
737 // Removing a tool view from all areas (e.g. when a plugin is unloaded possibly on KDevelop exit)
738 // normally destroys the tool view widget, but not if it is marked as used by a non-current sublime area
739 // because its cache use count stays positive in this case. The tool document is about to be destroyed, so
740 // remove the no longer usable cache entry and destroy the tool view widget in order to avoid leaking them.
741 // NOTE: the QMainWindow parent of a tool view widget with a toolbar is always created,
742 // reused, and destroyed along with the tool view widget itself, including here.
743
744 auto* const viewWidget = m_toolViewWidgetCache->remove(document);
745 if (viewWidget) {
746 delete existentWidgetForDockWidget(*m_mainWindow, viewWidget);
747 }
748}
749
750template<typename ToolViewUser>
751void IdealController::forEachShownToolView(ToolViewUser callback) const

Callers

nothing calls this directly

Calls 2

removeMethod · 0.45

Tested by

no test coverage detected