forked from qt-creator/qt-creator
ClangTools: FilterDialog: Capture by copy
A reference to buttonBox gets vahished after c'tor of FilterDialog
finished. Capture by copy the buttonBox.
Amends b72ae58629
Fixes: QTCREATORBUG-28524
Change-Id: Id6eaf826243e307f26a91c4bd6386cf836bce111
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -94,7 +94,7 @@ FilterDialog::FilterDialog(const Checks &checks, QWidget *parent)
|
||||
buttonBox,
|
||||
}.attachTo(this);
|
||||
|
||||
connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged, this, [&] {
|
||||
connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged, this, [=] {
|
||||
const bool hasSelection = !m_view->selectionModel()->selectedRows().isEmpty();
|
||||
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(hasSelection);
|
||||
});
|
||||
|
Reference in New Issue
Block a user