forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user