[plasmalnf] Fix iteration
`for k : images` iterates over the values in the map, while we need both the key (the theme-id) and the value (the image to hand to that theme).
This commit is contained in:
parent
bcff0454a3
commit
fb9fa347a0
@ -183,9 +183,9 @@ ThemesModel::setThemeImage( const QMap< QString, QString >& images )
|
||||
// Don't emit signals from each call, aggregate to one call (below this block)
|
||||
{
|
||||
QSignalBlocker b( this );
|
||||
for ( const auto& k : images )
|
||||
for ( auto k = images.constKeyValueBegin(); k != images.constKeyValueEnd(); ++k )
|
||||
{
|
||||
setThemeImage( k, images[ k ] );
|
||||
setThemeImage( k->first, k->second );
|
||||
}
|
||||
}
|
||||
emit dataChanged( index( 0, 0 ), index( m_themes->count() - 1 ), { ImageRole } );
|
||||
|
Loading…
Reference in New Issue
Block a user