diff --git a/src/plugins/clangcodemodel/test/clangdtests.cpp b/src/plugins/clangcodemodel/test/clangdtests.cpp index b25083faacb..bc970960d15 100644 --- a/src/plugins/clangcodemodel/test/clangdtests.cpp +++ b/src/plugins/clangcodemodel/test/clangdtests.cpp @@ -1432,7 +1432,6 @@ ClangdTestCompletion::ClangdTestCompletion() void ClangdTestCompletion::initTestCase() { ClangdTest::initTestCase(); - client()->forceHighlightingOnEmptyDelta(); startCollectingHighlightingInfo(); } diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp index c70e87efa3a..7605d900605 100644 --- a/src/plugins/languageclient/client.cpp +++ b/src/plugins/languageclient/client.cpp @@ -1016,13 +1016,6 @@ void Client::setSemanticTokensHandler(const SemanticTokensHandler &handler) m_tokenSupport.setTokensHandler(handler); } -#ifdef WITH_TESTS -void Client::forceHighlightingOnEmptyDelta() -{ - m_tokenSupport.forceHighlightingOnEmptyDelta(); -} -#endif - void Client::setSymbolStringifier(const LanguageServerProtocol::SymbolStringifier &stringifier) { m_symbolStringifier = stringifier; diff --git a/src/plugins/languageclient/client.h b/src/plugins/languageclient/client.h index a5821732a92..c9e241d47b5 100644 --- a/src/plugins/languageclient/client.h +++ b/src/plugins/languageclient/client.h @@ -195,10 +195,6 @@ public: void log(const LanguageServerProtocol::ResponseError &responseError) const { log(responseError.toString()); } -#ifdef WITH_TESTS - void forceHighlightingOnEmptyDelta(); -#endif - signals: void initialized(const LanguageServerProtocol::ServerCapabilities &capabilities); void capabilitiesChanged(const DynamicCapabilities &capabilities); diff --git a/src/plugins/languageclient/semantichighlightsupport.cpp b/src/plugins/languageclient/semantichighlightsupport.cpp index 57707c3271a..24fb346ff0b 100644 --- a/src/plugins/languageclient/semantichighlightsupport.cpp +++ b/src/plugins/languageclient/semantichighlightsupport.cpp @@ -387,8 +387,7 @@ void SemanticTokenSupport::handleSemanticTokensDelta( } else if (auto tokensDelta = Utils::get_if(&result)) { QList edits = tokensDelta->edits(); if (edits.isEmpty()) { - if (m_highlightOnEmptyDelta) - highlight(filePath); + highlight(filePath); return; } diff --git a/src/plugins/languageclient/semantichighlightsupport.h b/src/plugins/languageclient/semantichighlightsupport.h index b1144ec5a73..03fc2445fa1 100644 --- a/src/plugins/languageclient/semantichighlightsupport.h +++ b/src/plugins/languageclient/semantichighlightsupport.h @@ -81,7 +81,6 @@ public: // void setAdditionalTokenModifierStyles(const QHash &modifierStyles); void setTokensHandler(const SemanticTokensHandler &handler) { m_tokensHandler = handler; } - void forceHighlightingOnEmptyDelta() { m_highlightOnEmptyDelta = true; } private: LanguageServerProtocol::SemanticRequestTypes supportedSemanticRequests( @@ -107,7 +106,6 @@ private: SemanticTokensHandler m_tokensHandler; QStringList m_tokenTypeStrings; QStringList m_tokenModifierStrings; - bool m_highlightOnEmptyDelta = false; }; } // namespace LanguageClient