[libcalamares] Don't complain if there isn't a preset

- If the module knows about a preset, then it should be registered
  even if there is not a value set for it specifically; this avoids
  complaints from isEditable() for fields that are known, but
  do not have a preset. (Reported by Anke)
This commit is contained in:
Adriaan de Groot 2021-03-15 21:18:10 +01:00
parent a4c1f07521
commit a3a1350dc7

View file

@ -123,6 +123,13 @@ Config::ApplyPresets::apply( const char* fieldName )
}
m_c.d->m_presets->append( PresetField { key, value, editable } );
}
else
{
// There is no setting, but since we apply() this field,
// we do know about it; put in a preset so that looking
// it up won't complani.
m_c.d->m_presets->append( PresetField { key, QVariant(), true } );
}
return *this;
}