forked from qt-creator/qt-creator
ClangCodeModel: Provide diagnostics via clangd
Change-Id: Ib45a62ebe200c2b56a1bb1a66f8a92103e60d092 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -28,10 +28,14 @@
|
||||
#include <clangsupport_global.h>
|
||||
#include <clangsupport/diagnosticcontainer.h>
|
||||
|
||||
#include <languageserverprotocol/lsptypes.h>
|
||||
|
||||
#include <texteditor/textmark.h>
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace LanguageClient { class Client; }
|
||||
|
||||
namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
class ClangDiagnosticManager;
|
||||
@@ -60,5 +64,21 @@ private:
|
||||
const ClangDiagnosticManager * const m_diagMgr;
|
||||
};
|
||||
|
||||
class ClangdTextMark : public TextEditor::TextMark
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(ClangdTextMark)
|
||||
public:
|
||||
ClangdTextMark(const ::Utils::FilePath &filePath,
|
||||
const LanguageServerProtocol::Diagnostic &diagnostic,
|
||||
const LanguageClient::Client *client);
|
||||
|
||||
private:
|
||||
bool addToolTipContent(QLayout *target) const override;
|
||||
|
||||
const LanguageServerProtocol::Diagnostic m_lspDiagnostic;
|
||||
const ClangBackEnd::DiagnosticContainer m_diagnostic;
|
||||
const LanguageClient::Client * const m_client;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ClangCodeModel
|
||||
|
||||
Reference in New Issue
Block a user