LSP: Support remote LSP file paths

Change-Id: If3cf1b8d675ef091427dbcd703c7d14b384a1b3a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2022-12-15 07:23:55 +01:00
parent 0b33a08af1
commit 2d0456f085
36 changed files with 424 additions and 310 deletions

View File

@@ -24,11 +24,10 @@ void ClangdQuickFixFactory::match(const CppEditor::Internal::CppQuickFixInterfac
if (!client)
return;
const auto uri = DocumentUri::fromFilePath(interface.filePath());
QTextCursor cursor(interface.textDocument());
cursor.setPosition(interface.position());
cursor.select(QTextCursor::LineUnderCursor);
const QList<Diagnostic> &diagnostics = client->diagnosticsAt(uri, cursor);
const QList<Diagnostic> &diagnostics = client->diagnosticsAt(interface.filePath(), cursor);
for (const Diagnostic &diagnostic : diagnostics) {
ClangdDiagnostic clangdDiagnostic(diagnostic);
if (const auto actions = clangdDiagnostic.codeActions()) {