2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2015-08-31 16:28:26 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2015-08-31 16:28:26 +02:00
|
|
|
|
2022-05-02 12:29:57 +02:00
|
|
|
#include "clangutils.h"
|
2015-08-31 16:28:26 +02:00
|
|
|
|
2021-06-02 17:51:31 +02:00
|
|
|
#include <languageserverprotocol/lsptypes.h>
|
|
|
|
|
|
2015-08-31 16:28:26 +02:00
|
|
|
#include <texteditor/textmark.h>
|
|
|
|
|
|
2021-06-30 13:15:41 +02:00
|
|
|
#include <QPointer>
|
|
|
|
|
|
2016-11-17 15:55:06 +01:00
|
|
|
#include <functional>
|
|
|
|
|
|
2021-06-02 17:51:31 +02:00
|
|
|
namespace LanguageClient { class Client; }
|
|
|
|
|
|
2015-08-31 16:28:26 +02:00
|
|
|
namespace ClangCodeModel {
|
2019-02-06 16:17:03 +01:00
|
|
|
namespace Internal {
|
2015-08-31 16:28:26 +02:00
|
|
|
|
2022-05-12 08:48:50 +02:00
|
|
|
class ClangdClient;
|
|
|
|
|
|
2021-06-02 17:51:31 +02:00
|
|
|
class ClangdTextMark : public TextEditor::TextMark
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
ClangdTextMark(const ::Utils::FilePath &filePath,
|
|
|
|
|
const LanguageServerProtocol::Diagnostic &diagnostic,
|
2022-02-25 09:31:40 +01:00
|
|
|
bool isProjectFile,
|
2022-05-12 08:48:50 +02:00
|
|
|
ClangdClient *client);
|
2021-06-02 17:51:31 +02:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
bool addToolTipContent(QLayout *target) const override;
|
|
|
|
|
|
|
|
|
|
const LanguageServerProtocol::Diagnostic m_lspDiagnostic;
|
2022-05-02 12:29:57 +02:00
|
|
|
const ClangDiagnostic m_diagnostic;
|
2021-06-30 13:15:41 +02:00
|
|
|
const QPointer<const LanguageClient::Client> m_client;
|
2021-06-02 17:51:31 +02:00
|
|
|
};
|
|
|
|
|
|
2019-02-06 16:17:03 +01:00
|
|
|
} // namespace Internal
|
2015-08-31 16:28:26 +02:00
|
|
|
} // namespace ClangCodeModel
|