mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
[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
1 changed files with 1 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue