From 84b068d1b3cca49a420100d6e3b8703d093d25ca Mon Sep 17 00:00:00 2001 From: Alexis Murzeau Date: Sat, 2 May 2020 16:37:12 +0200 Subject: [PATCH] LSP: addDiagnosticsSelections should be static in Client.cpp That function should really be static, it is not meant to be used elsewhere. Also, replace duplicate "uri.toFilePath()" with just set filePath variable. Change-Id: I11e6cd2133d8999b34ed24b774ab13036f2b9fc8 Reviewed-by: Christian Stenger Reviewed-by: David Schulz --- src/plugins/languageclient/client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp index 48ea15bb803..7aa1cf70c5c 100644 --- a/src/plugins/languageclient/client.cpp +++ b/src/plugins/languageclient/client.cpp @@ -1061,7 +1061,7 @@ void Client::showMessageBox(const ShowMessageRequestParams &message, const Messa box->show(); } -void addDiagnosticsSelections(const Diagnostic &diagnostic, +static void addDiagnosticsSelections(const Diagnostic &diagnostic, QTextDocument *textDocument, QList &extraSelections) { @@ -1091,7 +1091,7 @@ void Client::showDiagnostics(const DocumentUri &uri) { const FilePath &filePath = uri.toFilePath(); if (TextEditor::TextDocument *doc = TextEditor::TextDocument::textDocumentForFilePath( - uri.toFilePath())) { + filePath)) { QList extraSelections; for (const Diagnostic &diagnostic : m_diagnostics.value(uri)) {