TextEditor: optimize setting refactor markers

emitting requestBlockUpdate is not for free so limitting it to blocks
that have changed improve the performance notable for documents with a
lot of refactoring markers.

Change-Id: Ie288a367d1d1d6a9f4359e37ff8486a1dfe36752
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2023-06-09 13:15:20 +02:00
parent 590cdf4f61
commit c547c8615f
8 changed files with 48 additions and 24 deletions

View File

@@ -200,7 +200,7 @@ void updateCodeActionRefactoringMarker(Client *client,
const RefactorMarkers markers = markersAtBlock.values();
for (BaseTextEditor *editor : editors) {
if (TextEditorWidget *editorWidget = editor->editorWidget())
editorWidget->setRefactorMarkers(markers + editorWidget->refactorMarkers());
editorWidget->setRefactorMarkers(markers, client->id());
}
}