CppTools: Fix parentheses mismatch

... when the ClangCodeModel is disabled.
The built-in highlighter's use of HighlightingResult::kind conflicted
with the ClangCodeModel's.
Amends d8c1e51bfe.

Change-Id: I79784679fd17d88cd543304de726f8576954b29c
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-02-04 14:31:51 +01:00
parent a5b93b54c8
commit 3d1b456dab
3 changed files with 7 additions and 4 deletions

View File

@@ -25,6 +25,7 @@
#include "clanghighlightingresultreporter.h"
#include <cpptools/semantichighlighter.h>
#include <texteditor/textstyles.h>
#include <utils/qtcassert.h>
@@ -143,9 +144,9 @@ TextEditor::HighlightingResult toHighlightingResult(
TextEditor::HighlightingResult result(tokenInfo.line, tokenInfo.column, tokenInfo.length,
textStyles);
if (tokenInfo.types.mixinHighlightingTypes.contains(HighlightingType::AngleBracketOpen))
result.kind = 1;
result.kind = CppTools::SemanticHighlighter::AngleBracketOpen;
else if (tokenInfo.types.mixinHighlightingTypes.contains(HighlightingType::AngleBracketClose))
result.kind = 2;
result.kind = CppTools::SemanticHighlighter::AngleBracketClose;
return result;
}