| 491 | } |
| 492 | |
| 493 | void VariableCollection::viewCreated(KTextEditor::Document* doc, |
| 494 | KTextEditor::View* view) |
| 495 | { |
| 496 | Q_UNUSED(doc); |
| 497 | Q_ASSERT(view); |
| 498 | |
| 499 | if (m_textHintProvidedViews.contains(view)) { |
| 500 | return; |
| 501 | } |
| 502 | connect(view, &QObject::destroyed, this, [this, view](QObject* obj) { |
| 503 | Q_ASSERT(obj == view); |
| 504 | m_textHintProvidedViews.removeOne(view); |
| 505 | }); |
| 506 | |
| 507 | view->registerTextHintProvider(&m_textHintProvider); |
| 508 | m_textHintProvidedViews.append(view); |
| 509 | } |
| 510 | |
| 511 | Locals* VariableCollection::locals(const QString &name) const |
| 512 | { |
no test coverage detected