[calamares] Use a "real" slot for UniqueConnection
Multiple reports of the following fatal error: WARNING (Qt): QObject::connect(QItemSelectionModel, PartitionPage): unique connections require a pointer to member function of a QObject subclass suggest to replace the unique lambda by a "real" slot.
This commit is contained in:
parent
7d63227014
commit
c69e229be0
@ -47,10 +47,15 @@ ProgressTreeView::setModel( QAbstractItemModel* model )
|
||||
|
||||
QListView::setModel( model );
|
||||
|
||||
connect(
|
||||
Calamares::ViewManager::instance(),
|
||||
&Calamares::ViewManager::currentStepChanged,
|
||||
this,
|
||||
[ this ]() { viewport()->update(); },
|
||||
Qt::UniqueConnection );
|
||||
connect( Calamares::ViewManager::instance(),
|
||||
&Calamares::ViewManager::currentStepChanged,
|
||||
this,
|
||||
&ProgressTreeView::update,
|
||||
Qt::UniqueConnection );
|
||||
}
|
||||
|
||||
void
|
||||
ProgressTreeView::update()
|
||||
{
|
||||
viewport()->update();
|
||||
}
|
||||
|
@ -31,6 +31,9 @@ public:
|
||||
* @brief setModel assigns a model to this view.
|
||||
*/
|
||||
void setModel( QAbstractItemModel* model ) override;
|
||||
|
||||
public Q_SLOTS:
|
||||
void update();
|
||||
};
|
||||
|
||||
#endif // PROGRESSTREEVIEW_H
|
||||
|
Loading…
Reference in New Issue
Block a user