TextEditor: return all BaseTextEditor for a document

Change-Id: Iab483528357fdba1b7107130c19370974c03979c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2019-03-12 13:46:31 +01:00
parent a1973090da
commit 6b59d711a8
5 changed files with 24 additions and 21 deletions

View File

@@ -217,6 +217,18 @@ void LanguageClientManager::editorOpened(Core::IEditor *iEditor)
(const QTextCursor &cursor) {
findUsages(filePath, cursor);
});
connect(widget, &TextEditorWidget::cursorPositionChanged, this, [this, widget](){
// TODO This would better be a compressing timer
QTimer::singleShot(50, this,
[this, widget = QPointer<TextEditorWidget>(widget)]() {
if (widget) {
for (Client *client : this->reachableClients()) {
if (client->isSupportedDocument(widget->textDocument()))
client->cursorPositionChanged(widget);
}
}
});
});
}
}
}