ClangCodeModel: Provide diagnostics via clangd

Change-Id: Ib45a62ebe200c2b56a1bb1a66f8a92103e60d092
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-06-02 17:51:31 +02:00
parent 54b4022987
commit 7bf52b0c0d
15 changed files with 320 additions and 48 deletions

View File

@@ -170,6 +170,10 @@ public:
QList<LanguageServerProtocol::Diagnostic> diagnosticsAt(
const LanguageServerProtocol::DocumentUri &uri,
const QTextCursor &cursor) const;
bool hasDiagnostic(const LanguageServerProtocol::DocumentUri &uri,
const LanguageServerProtocol::Diagnostic &diag) const;
void setDiagnosticsHandlers(const TextMarkCreator &textMarkCreator,
const HideDiagnosticsHandler &hideHandler);
// logging
void log(const QString &message) const;
@@ -189,6 +193,7 @@ protected:
void setProgressTitleForToken(const LanguageServerProtocol::ProgressToken &token,
const QString &message);
void handleMessage(const LanguageServerProtocol::BaseMessage &message);
virtual void handleDiagnostics(const LanguageServerProtocol::PublishDiagnosticsParams &params);
private:
void handleResponse(const LanguageServerProtocol::MessageId &id, const QByteArray &content,
@@ -196,7 +201,6 @@ private:
void handleMethod(const QString &method, const LanguageServerProtocol::MessageId &id,
const LanguageServerProtocol::IContent *content);
void handleDiagnostics(const LanguageServerProtocol::PublishDiagnosticsParams &params);
void handleSemanticHighlight(const LanguageServerProtocol::SemanticHighlightingParams &params);
void initializeCallback(const LanguageServerProtocol::InitializeRequest::Response &initResponse);