forked from qt-creator/qt-creator
TextEditor: return all BaseTextEditor for a document
Change-Id: Iab483528357fdba1b7107130c19370974c03979c Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -208,17 +208,6 @@ void Client::openDocument(Core::IDocument *document)
|
||||
connect(textDocument, &QObject::destroyed, this, [this, textDocument]{
|
||||
m_resetAssistProvider.remove(textDocument);
|
||||
});
|
||||
if (BaseTextEditor *editor = BaseTextEditor::textEditorForDocument(textDocument)) {
|
||||
if (QPointer<TextEditorWidget> widget = editor->editorWidget()) {
|
||||
connect(widget, &TextEditorWidget::cursorPositionChanged, this, [this, widget](){
|
||||
// TODO This would better be a compressing timer
|
||||
QTimer::singleShot(50, this, [this, widget]() {
|
||||
if (widget)
|
||||
cursorPositionChanged(widget);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_openedDocument.append(document->filePath());
|
||||
@@ -344,7 +333,7 @@ void Client::documentContentsChanged(Core::IDocument *document)
|
||||
|
||||
if (textDocument) {
|
||||
using namespace TextEditor;
|
||||
if (BaseTextEditor *editor = BaseTextEditor::textEditorForDocument(textDocument))
|
||||
for (BaseTextEditor *editor : BaseTextEditor::textEditorsForDocument(textDocument))
|
||||
if (TextEditorWidget *widget = editor->editorWidget())
|
||||
widget->setRefactorMarkers(RefactorMarker::filterOutType(widget->refactorMarkers(), id()));
|
||||
requestDocumentSymbols(textDocument);
|
||||
|
||||
Reference in New Issue
Block a user