From a8a3d79592b92d7cb7826c21541f25e317a28909 Mon Sep 17 00:00:00 2001 From: Semih Yavuz Date: Thu, 4 Jul 2024 16:25:05 +0200 Subject: [PATCH] Disable qmlls for the document when settingsChanged Qmlls client was still alive eventhough it was turned off via the settings page. This was causing both qmlls highlighter and the embedded highlighter do the job at the same time. Disable qmlls client appropriately. Fixes: QTCREATORBUG-31148 Change-Id: I9577a78f9c861cf2fe718ffe58f3d7f77a916b9a Reviewed-by: David Schulz --- src/plugins/qmljseditor/qmljseditordocument.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmljseditor/qmljseditordocument.cpp b/src/plugins/qmljseditor/qmljseditordocument.cpp index 2d537422daf..44c45f56dd3 100644 --- a/src/plugins/qmljseditor/qmljseditordocument.cpp +++ b/src/plugins/qmljseditor/qmljseditordocument.cpp @@ -768,7 +768,7 @@ void QmlJSEditorDocumentPrivate::settingsChanged() qCDebug(qmllsLog) << "disabling qmlls for" << q->filePath(); if (LanguageClient::Client *client = lspClientManager->clientForDocument(q)) { qCDebug(qmllsLog) << "deactivating " << q->filePath() << "in qmlls" << newQmlls; - client->deactivateDocument(q); + lspClientManager->openDocumentWithClient(q, nullptr); } else qCWarning(qmllsLog) << "Could not find client to disable for document " << q->filePath() << " in LanguageClient::LanguageClientManager";