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

Method outputViewModel

plugins/standardoutputview/outputwidget.cpp:416–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416KDevelop::IOutputViewModel *OutputWidget::outputViewModel() const
417{
418 auto view = qobject_cast<QAbstractItemView*>(currentWidget());
419 if( !view || !view->isVisible())
420 return nullptr;
421
422 QAbstractItemModel *absmodel = view->model();
423 auto* iface = qobject_cast<KDevelop::IOutputViewModel*>(absmodel);
424 if ( ! iface )
425 {
426 // try if it's a proxy model?
427 if ( auto* proxy = qobject_cast<QAbstractProxyModel*>(absmodel) )
428 {
429 iface = qobject_cast<KDevelop::IOutputViewModel*>(proxy->sourceModel());
430 }
431 }
432 return iface;
433}
434
435void OutputWidget::eventuallyDoFocus()
436{

Callers

nothing calls this directly

Calls 1

modelMethod · 0.45

Tested by

no test coverage detected