forked from qt-creator/qt-creator
ClangTools: Adapt button state to checked fixits
"Apply Fixits" is disabled by default and enabled as soon as some fixits are checked by the user. Change-Id: I7e1345512b206f52d1e8628705c81c6b34dfb9ba Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -161,6 +161,10 @@ ClangTidyClazyTool::ClangTidyClazyTool()
|
||||
// Apply fixits button
|
||||
m_applyFixitsButton = new QToolButton;
|
||||
m_applyFixitsButton->setText(tr("Apply Fixits"));
|
||||
m_applyFixitsButton->setEnabled(false);
|
||||
connect(m_diagnosticModel,
|
||||
&ClangToolsDiagnosticModel::fixItsToApplyCountChanged,
|
||||
[this](int c) { m_applyFixitsButton->setEnabled(c); });
|
||||
connect(m_applyFixitsButton, &QToolButton::clicked, [this]() {
|
||||
QVector<Diagnostic> diagnosticsWithFixits;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user