LSP: fix compile with Qt 6.2

Change-Id: Ia0b83166c9b859add450ae36001f3fa30cfb4b55
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mathias Hasselmann <mathias@taschenorakel.de>
This commit is contained in:
David Schulz
2024-01-12 12:59:27 +01:00
parent f114df2bd3
commit 83d2b82eb9
8 changed files with 35 additions and 29 deletions

View File

@@ -88,6 +88,8 @@ using namespace Utils;
namespace ClangCodeModel {
namespace Internal {
using Key = LanguageServerProtocol::Key;
Q_LOGGING_CATEGORY(clangdLog, "qtc.clangcodemodel.clangd", QtWarningMsg);
Q_LOGGING_CATEGORY(clangdLogAst, "qtc.clangcodemodel.clangd.ast", QtWarningMsg);
static Q_LOGGING_CATEGORY(clangdLogServer, "qtc.clangcodemodel.clangd.server", QtWarningMsg);

View File

@@ -624,7 +624,7 @@ IAssistProposal *ClangdFunctionHintProcessor::perform()
ClangdCompletionCapabilities::ClangdCompletionCapabilities(const JsonObject &object)
: TextDocumentClientCapabilities::CompletionCapabilities(object)
{
insert(Key{"editsNearCursor"}, true); // For dot-to-arrow correction.
insert(LanguageServerProtocol::Key{"editsNearCursor"}, true); // For dot-to-arrow correction.
if (std::optional<CompletionItemCapbilities> completionItemCaps = completionItem()) {
completionItemCaps->setSnippetSupport(false);
setCompletionItem(*completionItemCaps);

View File

@@ -46,8 +46,8 @@ public:
return components;
}
static constexpr Key totalKey{"_total"};
static constexpr Key selfKey{"_self"};
static constexpr LanguageServerProtocol::Key totalKey{"_total"};
static constexpr LanguageServerProtocol::Key selfKey{"_self"};
};