[libcalamaresui] Don't clear the map when inserting strings
- the documentation doesn't say the map is cleared, and the one place this function is used doesn't need that either. - make type of config explicit
This commit is contained in:
parent
a91edfef89
commit
da1cc7c3a5
@ -132,9 +132,7 @@ loadStrings( QMap< QString, QString >& map,
|
||||
throw YAML::Exception( YAML::Mark(), std::string( "Branding configuration is not a map: " ) + key );
|
||||
}
|
||||
|
||||
const auto& config = CalamaresUtils::yamlMapToVariant( doc[ key ] );
|
||||
|
||||
map.clear();
|
||||
const QVariantMap config = CalamaresUtils::yamlMapToVariant( doc[ key ] );
|
||||
for ( auto it = config.constBegin(); it != config.constEnd(); ++it )
|
||||
{
|
||||
map.insert( it.key(), transform( it.value().toString() ) );
|
||||
|
Loading…
Reference in New Issue
Block a user