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

Method startOutput

kdevplatform/outputview/outputjob.cpp:48–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46OutputJob::~OutputJob() = default;
47
48void OutputJob::startOutput()
49{
50 Q_D(OutputJob);
51
52 IPlugin* i = ICore::self()->pluginController()->pluginForExtension(QStringLiteral("org.kdevelop.IOutputView"));
53 if( i )
54 {
55 auto* view = i->extension<KDevelop::IOutputView>();
56 if( view )
57 {
58 if (d->standardToolView != -1) {
59 d->toolViewId = view->standardToolView(static_cast<IOutputView::StandardToolView>(d->standardToolView));
60 } else {
61 view->registerToolView(d->toolViewId, d->toolTitle, d->type, d->toolIcon, d->options);
62 }
63
64 if (d->title.isEmpty())
65 d->title = objectName();
66
67 d->outputId = view->registerOutputInToolView(d->toolViewId, d->title, d->behaviours);
68
69 if (!d->outputModel) {
70 d->outputModel = new QStandardItemModel(nullptr);
71 }
72
73 // Keep the item model around after the job is gone
74 view->setModel(d->outputId, d->outputModel);
75
76 if (!d->outputDelegate) {
77 d->outputDelegate = new QItemDelegate(nullptr);
78 }
79
80 view->setDelegate(d->outputId, d->outputDelegate);
81
82 if (d->killJobOnOutputClose) {
83 // can't use qt5 signal slot syntax here, IOutputView is no a QObject
84 connect(i, SIGNAL(outputRemoved(int)), this, SLOT(outputViewRemoved(int)));
85 }
86
87 if (d->verbosity == OutputJob::Verbose)
88 view->raiseOutput(d->outputId);
89 }
90 }
91}
92
93void OutputJob::outputViewRemoved(int id)
94{

Callers

nothing calls this directly

Calls 9

pluginControllerMethod · 0.80
standardToolViewMethod · 0.80
pluginForExtensionMethod · 0.45
registerToolViewMethod · 0.45
isEmptyMethod · 0.45
setModelMethod · 0.45
setDelegateMethod · 0.45
raiseOutputMethod · 0.45

Tested by

no test coverage detected