Commit 9419acc1 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Fix KWin scripts KCM not writing it's pending states to config

BUG: 455015
parent 095c7fd3
Pipeline #188494 passed with stage
in 12 minutes and 58 seconds
......@@ -23,6 +23,7 @@
#include <KPackage/PackageLoader>
#include <KPackage/PackageStructure>
#include <KPluginFactory>
#include <KSharedConfig>
#include <KCMultiDialog>
......@@ -31,7 +32,6 @@
Module::Module(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
: KQuickAddons::ConfigModule(parent, data, args)
, m_kwinConfig(KSharedConfig::openConfig("kwinrc"))
, m_kwinScriptsData(new KWinScriptsData(this))
, m_model(new KPluginModel(this))
{
......@@ -43,7 +43,7 @@ Module::Module(QObject *parent, const KPluginMetaData &data, const QVariantList
connect(m_model, &KPluginModel::defaulted, this, [this](bool defaulted) {
setRepresentsDefaults(defaulted);
});
m_model->setConfig(m_kwinConfig->group("Plugins"));
m_model->setConfig(KSharedConfig::openConfig("kwinrc")->group("Plugins"));
}
void Module::onGHNSEntriesChanged()
......@@ -155,7 +155,7 @@ void Module::save()
m_pendingDeletions.clear();
Q_EMIT pendingDeletionsChanged();
m_kwinConfig->sync();
m_model->save();
QDBusMessage message = QDBusMessage::createMethodCall("org.kde.KWin", "/Scripting", "org.kde.kwin.Scripting", "start");
QDBusConnection::sessionBus().asyncCall(message);
......
......@@ -11,7 +11,6 @@
#include <KPluginMetaData>
#include <KPluginModel>
#include <KQuickAddons/ConfigModule>
#include <KSharedConfig>
#include <kpluginmetadata.h>
class KJob;
......@@ -78,7 +77,6 @@ Q_SIGNALS:
private:
void importScriptInstallFinished(KJob *job);
KSharedConfigPtr m_kwinConfig;
KWinScriptsData *m_kwinScriptsData;
QList<KPluginMetaData> m_pendingDeletions;
KPluginModel *m_model;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment