2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2016-01-29 17:17:18 +01:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-05-02 12:29:57 +02:00
|
|
|
#include <QtGlobal>
|
2016-01-29 17:17:18 +01:00
|
|
|
|
2021-06-02 17:51:31 +02:00
|
|
|
#include <functional>
|
|
|
|
|
|
2016-07-22 08:57:32 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QLayout;
|
2020-09-18 12:39:32 +02:00
|
|
|
class QWidget;
|
2016-07-22 08:57:32 +02:00
|
|
|
QT_END_NAMESPACE
|
2016-01-29 17:17:18 +01:00
|
|
|
|
|
|
|
|
namespace ClangCodeModel {
|
|
|
|
|
namespace Internal {
|
2022-05-02 12:29:57 +02:00
|
|
|
class ClangDiagnostic;
|
2016-01-29 17:17:18 +01:00
|
|
|
|
2016-10-18 18:01:57 +02:00
|
|
|
class ClangDiagnosticWidget {
|
|
|
|
|
public:
|
|
|
|
|
enum Destination { ToolTip, InfoBar };
|
2016-10-04 16:23:42 +02:00
|
|
|
|
2022-05-02 12:29:57 +02:00
|
|
|
static QString createText(const QList<ClangDiagnostic> &diagnostics,
|
2019-01-28 11:43:18 +01:00
|
|
|
const Destination &destination);
|
2020-11-20 17:26:26 +01:00
|
|
|
|
2021-06-02 17:51:31 +02:00
|
|
|
|
2022-05-02 12:29:57 +02:00
|
|
|
static QWidget *createWidget(const QList<ClangDiagnostic> &diagnostics,
|
2020-11-20 17:26:26 +01:00
|
|
|
const Destination &destination,
|
2021-10-12 13:44:35 +02:00
|
|
|
const std::function<bool()> &canApplyFixIt,
|
|
|
|
|
const QString &source);
|
2016-10-18 18:01:57 +02:00
|
|
|
};
|
2016-01-29 17:17:18 +01:00
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace ClangCodeModel
|