| 733 | } |
| 734 | |
| 735 | void 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 | |
| 750 | template<typename ToolViewUser> |
| 751 | void IdealController::forEachShownToolView(ToolViewUser callback) const |
nothing calls this directly
no test coverage detected