https://bugs.kde.org/show_bug.cgi?id=481741

--- Comment #3 from Oded Arbel <o...@geek.co.il> ---
This works better:

diff --git a/wallpapers/image/plugin/imagebackend.cpp
b/wallpapers/image/plugin/imagebackend.cpp
index e8d51ba2bf..754fb7077b 100644
--- a/wallpapers/image/plugin/imagebackend.cpp
+++ b/wallpapers/image/plugin/imagebackend.cpp
@@ -21,10 +21,11 @@
 #include <QMimeDatabase>
 #include <QScreen>
 #include <QStandardPaths>

 #include <KLocalizedString>
+#include <KConfigPropertyMap>

 #include "model/imageproxymodel.h"
 #include "slidefiltermodel.h"
 #include "slidemodel.h"

@@ -356,10 +357,13 @@ void ImageBackend::setConfigMap(QQmlPropertyMap
*configMap)

     connect(m_configMap, &QQmlPropertyMap::valueChanged, this, [this](const
QString &key, const QVariant & /* value */) {
         if (key == QStringLiteral("Image")) {
             Q_EMIT configMapChanged();
         }
+        if (!m_configMap.isNull()) {
+           
static_cast<KConfigPropertyMap*>(m_configMap.data())->writeConfig();
+        }
     });

     saveCurrentWallpaper();
 }

Still horrible, but at least gets the job done. As a general concept - if the
API was sane - would that be acceptable?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to