[netinstall] isCritical is const after construction

This commit is contained in:
Adriaan de Groot 2020-03-10 12:38:11 -05:00
parent 09006a936d
commit b074696ac1
3 changed files with 4 additions and 11 deletions

View File

@ -234,6 +234,10 @@ PackageModel::setupModelData( const YAML::Node& data, PackageTreeItem* parent )
{
itemData.postScript = CalamaresUtils::yamlToVariant( itemDefinition[ "post-install" ] ).toString();
}
if ( itemDefinition[ "critical" ] )
{
itemData.isCritical = CalamaresUtils::yamlToVariant( itemDefinition[ "critical" ] ).toBool();
}
PackageTreeItem* item = new PackageTreeItem( itemData, parent );
if ( itemDefinition[ "selected" ] )
@ -249,10 +253,6 @@ PackageModel::setupModelData( const YAML::Node& data, PackageTreeItem* parent )
item->setHidden( CalamaresUtils::yamlToVariant( itemDefinition[ "hidden" ] ).toBool() );
}
if ( itemDefinition[ "critical" ] )
{
item->setCritical( CalamaresUtils::yamlToVariant( itemDefinition[ "critical" ] ).toBool() );
}
if ( itemDefinition[ "packages" ] )
for ( YAML::const_iterator packageIt = itemDefinition[ "packages" ].begin();

View File

@ -217,12 +217,6 @@ PackageTreeItem::isCritical() const
return m_data.isCritical;
}
void
PackageTreeItem::setCritical( bool isCritical )
{
m_data.isCritical = isCritical;
}
Qt::CheckState
PackageTreeItem::isSelected() const
{

View File

@ -79,7 +79,6 @@ public:
bool hiddenSelected() const;
bool isCritical() const;
void setCritical( bool isCritical );
Qt::CheckState isSelected() const;
void setSelected( Qt::CheckState isSelected );