[calamares] Role names for progress model
This commit is contained in:
parent
ba4b42b4ee
commit
04cb5f14f7
@ -108,3 +108,12 @@ ProgressTreeModel::rowCount( const QModelIndex& parent ) const
|
||||
const Calamares::ViewManager* vm = Calamares::ViewManager::instance();
|
||||
return vm ? vm->viewSteps().length() : 0;
|
||||
}
|
||||
|
||||
QHash< int, QByteArray >
|
||||
ProgressTreeModel::roleNames() const
|
||||
{
|
||||
auto h = QAbstractListModel::roleNames();
|
||||
h.insert( ProgressTreeItemCurrentRole, "current" );
|
||||
h.insert( ProgressTreeItemCompletedRole, "completed" );
|
||||
return h;
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ public:
|
||||
|
||||
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
||||
int rowCount( const QModelIndex& parent = QModelIndex() ) const override;
|
||||
|
||||
QHash< int, QByteArray > roleNames() const override;
|
||||
};
|
||||
|
||||
#endif // PROGRESSTREEMODEL_H
|
||||
|
Loading…
Reference in New Issue
Block a user