[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 );
|
QListView::setModel( model );
|
||||||
|
|
||||||
connect(
|
connect( Calamares::ViewManager::instance(),
|
||||||
Calamares::ViewManager::instance(),
|
&Calamares::ViewManager::currentStepChanged,
|
||||||
&Calamares::ViewManager::currentStepChanged,
|
this,
|
||||||
this,
|
&ProgressTreeView::update,
|
||||||
[ this ]() { viewport()->update(); },
|
Qt::UniqueConnection );
|
||||||
Qt::UniqueConnection );
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ProgressTreeView::update()
|
||||||
|
{
|
||||||
|
viewport()->update();
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,9 @@ public:
|
|||||||
* @brief setModel assigns a model to this view.
|
* @brief setModel assigns a model to this view.
|
||||||
*/
|
*/
|
||||||
void setModel( QAbstractItemModel* model ) override;
|
void setModel( QAbstractItemModel* model ) override;
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
void update();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PROGRESSTREEVIEW_H
|
#endif // PROGRESSTREEVIEW_H
|
||||||
|
Loading…
Reference in New Issue
Block a user