Copied from Kate's KateMDI::ToolView::childEvent() in order to fix the Diagnostics tool view layout.
| 190 | protected: |
| 191 | // Copied from Kate's KateMDI::ToolView::childEvent() in order to fix the Diagnostics tool view layout. |
| 192 | void childEvent(QChildEvent* ev) override |
| 193 | { |
| 194 | // set the widget to be focus proxy if possible |
| 195 | if (ev->type() == QEvent::ChildAdded) { |
| 196 | if (auto* const widget = qobject_cast<QWidget*>(ev->child())) { |
| 197 | setFocusProxy(widget); |
| 198 | layout()->addWidget(widget); |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | QWidget::childEvent(ev); |
| 203 | } |
| 204 | }; |
| 205 | |
| 206 | class ToolViewFactory : public QObject, public KDevelop::IToolViewFactory |