From a9f5ada73bf86a145e057eff188f45dfdf61917a Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Thu, 26 Jan 2017 16:17:51 +0000 Subject: [PATCH] When swapping Wallpapers, save the config to file, not just to propertymap Summary: ContainmentConfigView has a special code path for wallpaper configs where, if you change wallpaper type, it will create a temporary config ConfigPropertyMap, then copy it over to the real config when the containment actually changes. ConfigPropertyMap does not call valueChanged() on insertion (See QQmlPropertyMap), and we only write the value into the actual KConfigSkeleton on valueChange. BUG: 375532 Test Plan: Start plasma with image wallpaper Set to colour wallpaper and save colour Hit apply Close plasma Start plasma Before the correct colour wouldn't be loaded. Now it is. Reviewers: #plasma, mart Reviewed By: mart Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D4285 --- shell/containmentconfigview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/containmentconfigview.cpp b/shell/containmentconfigview.cpp index 269ae2b3a..4d107bec1 100644 --- a/shell/containmentconfigview.cpp +++ b/shell/containmentconfigview.cpp @@ -220,7 +220,9 @@ void ContainmentConfigView::applyWallpaper() if (m_currentWallpaperConfig && m_ownWallpaperConfig) { for (const auto &key : m_ownWallpaperConfig->keys()) { - m_currentWallpaperConfig->insert(key, m_ownWallpaperConfig->value(key)); + auto value = m_ownWallpaperConfig->value(key); + m_currentWallpaperConfig->insert(key, value); + m_currentWallpaperConfig->valueChanged(key, value); } }