[calamares] Increase constness
- The model shouldn't change items at all.
This commit is contained in:
parent
85845c9b3e
commit
5dfc4884b3
@ -29,17 +29,17 @@ ViewStepItem::ViewStepItem( std::function< QString() > prettyName,
|
|||||||
std::function< const Calamares::ViewStep*() > accessor,
|
std::function< const Calamares::ViewStep*() > accessor,
|
||||||
ProgressTreeItem* parent )
|
ProgressTreeItem* parent )
|
||||||
: ProgressTreeItem( parent )
|
: ProgressTreeItem( parent )
|
||||||
|
, m_accessor( accessor )
|
||||||
|
, m_prettyName( prettyName )
|
||||||
, m_step( nullptr )
|
, m_step( nullptr )
|
||||||
{
|
{
|
||||||
m_prettyName = prettyName;
|
|
||||||
m_accessor = accessor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ViewStepItem::ViewStepItem( const Calamares::ViewStep* step, ProgressTreeItem* parent )
|
ViewStepItem::ViewStepItem( const Calamares::ViewStep* step, ProgressTreeItem* parent )
|
||||||
: ProgressTreeItem( parent )
|
: ProgressTreeItem( parent )
|
||||||
|
, m_step( step )
|
||||||
{
|
{
|
||||||
m_step = step;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -44,9 +44,9 @@ public:
|
|||||||
QVariant data( int role ) const override;
|
QVariant data( int role ) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::function< const Calamares::ViewStep*() > m_accessor;
|
const std::function< const Calamares::ViewStep*() > m_accessor;
|
||||||
std::function< QString() > m_prettyName;
|
const std::function< QString() > m_prettyName;
|
||||||
const Calamares::ViewStep* m_step;
|
const Calamares::ViewStep* const m_step;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user