forked from qt-creator/qt-creator
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:
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user