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
wilder-5.14
David Edmundson 9 years ago
parent b5d729567a
commit a9f5ada73b
  1. 4
      shell/containmentconfigview.cpp

@ -220,7 +220,9 @@ void ContainmentConfigView::applyWallpaper()
if (m_currentWallpaperConfig && m_ownWallpaperConfig) { if (m_currentWallpaperConfig && m_ownWallpaperConfig) {
for (const auto &key : m_ownWallpaperConfig->keys()) { 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);
} }
} }

Loading…
Cancel
Save