forked from qt-creator/qt-creator
ClangCodeModel: do not highlight tokens as Text
Fixes: QTCREATORBUG-28639 Fixes: QTCREATORBUG-28637 Change-Id: Idfcfc6c61db9d5449ab14eda566ce704160bac54 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
Christian Kandeler
parent
647287ee0c
commit
91b5274276
@@ -366,6 +366,10 @@ void doSemanticHighlighting(
|
|||||||
const QList<BlockRange> ifdefedOutBlocks = cleanupDisabledCode(results, &doc, docContents);
|
const QList<BlockRange> ifdefedOutBlocks = cleanupDisabledCode(results, &doc, docContents);
|
||||||
ExtraHighlightingResultsCollector(future, results, filePath, ast, &doc, docContents,
|
ExtraHighlightingResultsCollector(future, results, filePath, ast, &doc, docContents,
|
||||||
clangdVersion).collect();
|
clangdVersion).collect();
|
||||||
|
Utils::erase(results, [](const HighlightingResult &res) {
|
||||||
|
// QTCREATORBUG-28639
|
||||||
|
return res.textStyles.mainStyle == C_TEXT && res.textStyles.mixinStyles.empty();
|
||||||
|
});
|
||||||
if (!future.isCanceled()) {
|
if (!future.isCanceled()) {
|
||||||
qCInfo(clangdLogHighlight) << "reporting" << results.size() << "highlighting results";
|
qCInfo(clangdLogHighlight) << "reporting" << results.size() << "highlighting results";
|
||||||
QMetaObject::invokeMethod(textDocument, [textDocument, ifdefedOutBlocks, docRevision] {
|
QMetaObject::invokeMethod(textDocument, [textDocument, ifdefedOutBlocks, docRevision] {
|
||||||
|
Reference in New Issue
Block a user