Clang: Add checkbox for fix-its column header

Make possible to select or deselect all fix-its.

Change-Id: I2ff88afb0c451092752ee2cd7c9f083e24033500
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-06-21 13:53:41 +02:00
parent a8cbc1c4da
commit 2d97b5950c
4 changed files with 82 additions and 1 deletions

View File

@@ -251,7 +251,10 @@ ClangTidyClazyTool::ClangTidyClazyTool()
m_applyFixitsButton->setEnabled(false);
connect(m_diagnosticModel,
&ClangToolsDiagnosticModel::fixItsToApplyCountChanged,
[this](int c) { m_applyFixitsButton->setEnabled(c); });
[this](int c) {
m_applyFixitsButton->setEnabled(c);
static_cast<DiagnosticView *>(m_diagnosticView)->setSelectedFixItsCount(c);
});
connect(m_applyFixitsButton, &QToolButton::clicked, [this]() {
QVector<DiagnosticItem *> diagnosticItems;
m_diagnosticModel->rootItem()->forChildrenAtLevel(1, [&](TreeItem *item){