forked from qt-creator/qt-creator
ClangCodeModel: Differentiate between clangd debug output log levels
Depending on the kind of highlighting issue we want to debug, we may or may not be interested in the actual tokens. Change-Id: I412126d3e97949a31f1dd5f339dc09072f28be64 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -2854,9 +2854,10 @@ void ClangdClient::Private::handleSemanticTokens(TextDocument *doc,
|
||||
int version, bool force)
|
||||
{
|
||||
SubtaskTimer t(highlightingTimer);
|
||||
qCDebug(clangdLog) << "handling LSP tokens" << doc->filePath() << tokens.size();
|
||||
qCInfo(clangdLogHighlight) << "handling LSP tokens" << doc->filePath()
|
||||
<< version << tokens.size();
|
||||
if (version != q->documentVersion(doc->filePath())) {
|
||||
qCDebug(clangdLogHighlight) << "LSP tokens outdated; aborting highlighting procedure"
|
||||
qCInfo(clangdLogHighlight) << "LSP tokens outdated; aborting highlighting procedure"
|
||||
<< version << q->documentVersion(doc->filePath());
|
||||
return;
|
||||
}
|
||||
@@ -2864,7 +2865,7 @@ void ClangdClient::Private::handleSemanticTokens(TextDocument *doc,
|
||||
const auto previous = previousTokens.find(doc);
|
||||
if (previous != previousTokens.end()) {
|
||||
if (!force && previous->first == tokens && previous->second == version) {
|
||||
qCDebug(clangdLogHighlight) << "tokens and version same as last time; nothing to do";
|
||||
qCInfo(clangdLogHighlight) << "tokens and version same as last time; nothing to do";
|
||||
return;
|
||||
}
|
||||
previous->first = tokens;
|
||||
@@ -2881,7 +2882,7 @@ void ClangdClient::Private::handleSemanticTokens(TextDocument *doc,
|
||||
if (!q->documentOpen(doc))
|
||||
return;
|
||||
if (version != q->documentVersion(doc->filePath())) {
|
||||
qCDebug(clangdLogHighlight) << "AST not up to date; aborting highlighting procedure"
|
||||
qCInfo(clangdLogHighlight) << "AST not up to date; aborting highlighting procedure"
|
||||
<< version << q->documentVersion(doc->filePath());
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user