aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/languageclient
diff options
context:
space:
mode:
authorAlexis Murzeau <amubtdx@gmail.com>2020-05-02 16:37:12 +0200
committerAlexis Murzeau <amubtdx@gmail.com>2020-05-12 22:28:44 +0000
commit84b068d1b3cca49a420100d6e3b8703d093d25ca (patch)
treefa9c1a52ce2f480baf70cb609e6ebfbb5bf8ec56 /src/plugins/languageclient
parentfcd8b1a8f02a6dd68b3140ea8a957754b19b39ec (diff)
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 <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/languageclient')
-rw-r--r--src/plugins/languageclient/client.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp
index 48ea15bb80..7aa1cf70c5 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<QTextEdit::ExtraSelection> &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<QTextEdit::ExtraSelection> extraSelections;
for (const Diagnostic &diagnostic : m_diagnostics.value(uri)) {