blob: 0db90bee42fc16bba2e603301bbb32a3d55efdba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include "executableinfo.h"
#include <cppeditor/clangdiagnosticconfigswidget.h>
#include <memory>
namespace ClangTools::Internal {
class ClazyChecksSortFilterModel;
class ClazyChecksTreeModel;
class ClazyChecksWidget;
class Diagnostic;
class BaseChecksTreeModel;
class TidyChecksTreeModel;
class TidyChecksWidget;
void disableChecks(const QList<Diagnostic> &diagnostics);
// Like CppEditor::ClangDiagnosticConfigsWidget, but with tabs/widgets for clang-tidy and clazy
class DiagnosticConfigsWidget : public CppEditor::ClangDiagnosticConfigsWidget
{
Q_OBJECT
public:
DiagnosticConfigsWidget(const CppEditor::ClangDiagnosticConfigs &configs,
const Utils::Id &configToSelect,
const ClangTidyInfo &tidyInfo,
const ClazyStandaloneInfo &clazyInfo);
~DiagnosticConfigsWidget();
private:
void syncExtraWidgets(const CppEditor::ClangDiagnosticConfig &config) override;
void syncClangTidyWidgets(const CppEditor::ClangDiagnosticConfig &config);
void syncTidyChecksToTree(const CppEditor::ClangDiagnosticConfig &config);
void syncClazyWidgets(const CppEditor::ClangDiagnosticConfig &config);
void syncClazyChecksGroupBox();
void onClangTidyTreeChanged();
void onClazyTreeChanged();
void connectClangTidyItemChanged();
void disconnectClangTidyItemChanged();
void connectClazyItemChanged();
void disconnectClazyItemChanged();
void handleChecksAsStringsButtonClicked(BaseChecksTreeModel *model);
// Clang-Tidy
TidyChecksWidget *m_tidyChecks = nullptr;
std::unique_ptr<TidyChecksTreeModel> m_tidyTreeModel;
ClangTidyInfo m_tidyInfo;
// Clazy
ClazyChecksWidget *m_clazyChecks = nullptr;
ClazyChecksSortFilterModel *m_clazySortFilterProxyModel = nullptr;
std::unique_ptr<ClazyChecksTreeModel> m_clazyTreeModel;
ClazyStandaloneInfo m_clazyInfo;
};
} // ClangTools::Internal
|