ClangCodeModel: report highlight results in one batch again

... with Qt 6.6

Change-Id: Ic3ebb5cee4deeebf87a0d8e0ab33bcdc1c92c3a2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
David Schulz
2023-06-01 14:42:15 +02:00
parent b0d5e41e53
commit 270972c7bb

View File

@@ -421,8 +421,12 @@ void doSemanticHighlighting(
if (ClangdClient * const client = ClangModelManagerSupport::clientForFile(filePath)) if (ClangdClient * const client = ClangModelManagerSupport::clientForFile(filePath))
client->setVirtualRanges(filePath, virtualRanges, docRevision); client->setVirtualRanges(filePath, virtualRanges, docRevision);
}, Qt::QueuedConnection); }, Qt::QueuedConnection);
#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
promise.addResults(results);
#else
for (const HighlightingResult &r : results) for (const HighlightingResult &r : results)
promise.addResult(r); promise.addResult(r);
#endif
} }
} }