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

Method removeToolView

plugins/standardoutputview/standardoutputview.cpp:207–227  ·  view source on GitHub ↗

TODO: only StandardOutputViewTest calls this function, so output tool views are never removed in KDevelop. Calling Sublime::Area::removeToolView() in a loop does not completely remove a tool view, so consider calling IUiController::removeToolView() instead. StandardOutputView::addToolView() calls IUiController::addToolView() but StandardOutputView::unload() does not call IUiController::removeToolV

Source from the content-addressed store, hash-verified

205// the unloading is prevented by the absence of the "X-KDevelop-Category": "Global"
206// entry in kdevstandardoutputview.json (see df99304843fbdb593398e3d7d912e15cbd7c56b9).
207void StandardOutputView::removeToolView(const QString& toolViewId)
208{
209 const auto toolViewIt = m_toolViews.find(toolViewId);
210 if (toolViewIt != m_toolViews.end()) {
211 ToolViewData* td = *toolViewIt;
212 const auto views = td->views;
213 for (Sublime::View* view : views) {
214 if (auto* const widget = view->widget()) {
215 auto* const outputWidget = qobject_cast<OutputWidget*>(widget);
216 for (auto it = td->outputdata.keyBegin(), end = td->outputdata.keyEnd(); it != end; ++it) {
217 outputWidget->removeOutput(*it);
218 }
219 }
220 for (Sublime::Area* area : KDevelop::ICore::self()->uiController()->controller()->allAreas()) {
221 area->removeToolView( view );
222 }
223 }
224 delete td;
225 m_toolViews.erase(toolViewIt);
226 }
227}
228
229OutputWidget* StandardOutputView::outputWidgetForId( int outputId ) const
230{

Callers 15

unloadMethod · 0.45
unloadMethod · 0.45
unloadMethod · 0.45
unloadMethod · 0.45
unloadMethod · 0.45
unloadMethod · 0.45
unloadMethod · 0.45
unloadMethod · 0.45
unloadMethod · 0.45
unloadMethod · 0.45
unloadMethod · 0.45

Calls 7

allAreasMethod · 0.80
uiControllerMethod · 0.80
findMethod · 0.45
endMethod · 0.45
widgetMethod · 0.45
removeOutputMethod · 0.45
controllerMethod · 0.45

Tested by 5

unloadMethod · 0.36
testActionsMethod · 0.36