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

Method clearModel

plugins/standardoutputview/outputwidget.cpp:230–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void OutputWidget::clearModel()
231{
232 auto view = qobject_cast<QAbstractItemView*>(currentWidget());
233 if( !view || !view->isVisible())
234 return;
235
236 KDevelop::OutputModel *outputModel = nullptr;
237 if (auto proxy = qobject_cast<QAbstractProxyModel*>(view->model())) {
238 outputModel = qobject_cast<KDevelop::OutputModel*>(proxy->sourceModel());
239 } else {
240 outputModel = qobject_cast<KDevelop::OutputModel*>(view->model());
241 }
242 outputModel->clear();
243}
244
245void OutputWidget::addOutput( int id )
246{

Callers

nothing calls this directly

Calls 2

modelMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected