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

Method closeView

plugins/standardoutputview/outputwidget.cpp:327–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327bool OutputWidget::closeView(const QWidget* view)
328{
329 Q_ASSERT(view);
330 Q_ASSERT(qobject_cast<const QAbstractItemView*>(view));
331
332 const auto fvIt = constFindFilteredView(static_cast<const QAbstractItemView*>(view));
333 if (fvIt == m_views.cend()) {
334 return false;
335 }
336
337 const auto id = fvIt.key();
338 if (!(data->outputdata.value(id)->behaviour & KDevelop::IOutputView::AllowUserClose)) {
339 return false;
340 }
341
342 data->plugin->removeOutput(id);
343 enableActions();
344 return true;
345}
346
347template<class ViewContainer>
348void OutputWidget::closeFirstViewIfTooMany(const ViewContainer& viewContainer)

Callers 1

fileItemChangedMethod · 0.45

Calls 3

keyMethod · 0.45
valueMethod · 0.45
removeOutputMethod · 0.45

Tested by

no test coverage detected