forked from qt-creator/qt-creator
LanguageClient: fix compile with Qt 6.2
Change-Id: Iac02d004286641b95a6729c367c339bf94e70bed Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Mathias Hasselmann <mathias@taschenorakel.de>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user