[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
main
Adriaan de Groot 5 years ago
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…
Cancel
Save