From fb9fa347a0f8c9ee62b3ed1496c801c20dffbb1a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 30 Nov 2020 12:29:47 +0100 Subject: [PATCH] [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). --- src/modules/plasmalnf/ThemeInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/plasmalnf/ThemeInfo.cpp b/src/modules/plasmalnf/ThemeInfo.cpp index 77f0a30ab..82da064be 100644 --- a/src/modules/plasmalnf/ThemeInfo.cpp +++ b/src/modules/plasmalnf/ThemeInfo.cpp @@ -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 } );