From 22989d4d82a4a6b8aeefac48f55ad5c0d9a90af6 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 12 Jan 2024 13:03:16 +0100 Subject: [PATCH] LanguageClient: fix compile with Qt 6.2 Change-Id: Iac02d004286641b95a6729c367c339bf94e70bed Reviewed-by: Reviewed-by: Christian Stenger Reviewed-by: Mathias Hasselmann --- src/plugins/languageclient/languageclientutils.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/languageclient/languageclientutils.cpp b/src/plugins/languageclient/languageclientutils.cpp index ac919651ef2..404f534cab6 100644 --- a/src/plugins/languageclient/languageclientutils.cpp +++ b/src/plugins/languageclient/languageclientutils.cpp @@ -470,8 +470,8 @@ private: QTimer m_killTimer; }; -constexpr QLatin1StringView YAML_MIME_TYPE{"application/x-yaml"}; -constexpr QLatin1StringView JSON_MIME_TYPE{"application/json"}; +constexpr char YAML_MIME_TYPE[]{"application/x-yaml"}; +constexpr char JSON_MIME_TYPE[]{"application/json"}; void autoSetupLanguageServer(TextDocument *document) { @@ -534,7 +534,8 @@ void autoSetupLanguageServer(TextDocument *document) settings->m_executable = executable; settings->m_arguments = "--stdio"; settings->m_name = Tr::tr("%1 Language Server").arg(language); - settings->m_languageFilter.mimeTypes = {isYaml ? YAML_MIME_TYPE : JSON_MIME_TYPE}; + settings->m_languageFilter.mimeTypes = {isYaml ? QString(YAML_MIME_TYPE) + : QString(JSON_MIME_TYPE)}; LanguageClientSettings::addSettings(settings); LanguageClientManager::applySettings();