2015-08-31 16:28:26 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2015-08-31 16:28:26 +02:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2015-08-31 16:28:26 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
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
|
|
|
|
2021-06-02 17:51:31 +02:00
|
|
|
class ClangdTextMark : public TextEditor::TextMark
|
|
|
|
|
{
|
|
|
|
|
Q_DECLARE_TR_FUNCTIONS(ClangdTextMark)
|
|
|
|
|
public:
|
|
|
|
|
ClangdTextMark(const ::Utils::FilePath &filePath,
|
|
|
|
|
const LanguageServerProtocol::Diagnostic &diagnostic,
|
2022-02-25 09:31:40 +01:00
|
|
|
bool isProjectFile,
|
2021-06-02 17:51:31 +02:00
|
|
|
const LanguageClient::Client *client);
|
|
|
|
|
|
|
|
|
|
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
|