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 <david.schulz@qt.io>
This commit is contained in:
Semih Yavuz
2024-07-04 16:25:05 +02:00
parent eaa40953af
commit a8a3d79592

View File

@@ -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";