diff --git a/kcms/launch/launchfeedback.cpp b/kcms/launch/launchfeedback.cpp index f00d74481..4dfcdcab1 100644 --- a/kcms/launch/launchfeedback.cpp +++ b/kcms/launch/launchfeedback.cpp @@ -1,66 +1,56 @@ /* * Copyright (C) 2001 Rik Hemsley (rikkus) * Copyright (C) 2017 Eike Hein * Copyright (c) 2019 Cyril Rossi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software */ #include "launchfeedback.h" #include #include #include #include "kwin_interface.h" #include "launchfeedbacksettings.h" K_PLUGIN_FACTORY_WITH_JSON(LaunchFactory, "kcm_launchfeedback.json", registerPlugin();) LaunchFeedback::LaunchFeedback(QObject *parent, const QVariantList &args) : KQuickAddons::ManagedConfigModule(parent, args) , m_settings(new LaunchFeedbackSettings(this)) { qmlRegisterUncreatableType("org.kde.private.kcms.launchfeedback", 1, 0, "KCM", QStringLiteral("Cannot create instances of KCM")); qmlRegisterType(); KAboutData *about = new KAboutData(QStringLiteral("kcm_launchfeedback"), i18n("Configure application launch feedback"), QStringLiteral("0.2"), QString(), KAboutLicense::LGPL); setAboutData(about); setButtons(Apply | Default); } LaunchFeedback::~LaunchFeedback() { } LaunchFeedbackSettings *LaunchFeedback::launchFeedbackSettings() const { return m_settings; } -void LaunchFeedback::save() -{ - ManagedConfigModule::save(); - - org::kde::kwin::Effects kwin(QStringLiteral("org.kde.KWin"), - QStringLiteral("/Effects"), - QDBusConnection::sessionBus()); - kwin.reconfigureEffect(QStringLiteral("startupfeedback")); -} - #include "launchfeedback.moc" diff --git a/kcms/launch/launchfeedback.h b/kcms/launch/launchfeedback.h index d0a24310b..a8a1ae8a8 100644 --- a/kcms/launch/launchfeedback.h +++ b/kcms/launch/launchfeedback.h @@ -1,54 +1,51 @@ /* * Copyright (C) 2001 Rik Hemsley (rikkus) * Copyright (C) 2017 Eike Hein * Copyright (c) 2019 Cyril Rossi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software */ #ifndef LAUNCHFEEDBACK_H #define LAUNCHFEEDBACK_H #include class LaunchFeedbackSettings; class LaunchFeedback : public KQuickAddons::ManagedConfigModule { Q_OBJECT Q_PROPERTY(LaunchFeedbackSettings *launchFeedbackSettings READ launchFeedbackSettings CONSTANT) public: enum class CursorFeedbackType { None, Static, Blinking, Bouncing, }; Q_ENUM(CursorFeedbackType) explicit LaunchFeedback(QObject *parent = nullptr, const QVariantList &list = QVariantList()); ~LaunchFeedback() override; LaunchFeedbackSettings *launchFeedbackSettings() const; -public Q_SLOTS: - void save() override; - private: LaunchFeedbackSettings *m_settings; }; #endif diff --git a/kcms/launch/launchfeedbacksettings.kcfgc b/kcms/launch/launchfeedbacksettings.kcfgc index 5a4849686..3431ca462 100644 --- a/kcms/launch/launchfeedbacksettings.kcfgc +++ b/kcms/launch/launchfeedbacksettings.kcfgc @@ -1,6 +1,7 @@ File=launchfeedbacksettings.kcfg ClassName=LaunchFeedbackSettings Mutators=true DefaultValueGetters=true GenerateProperties=true ParentInConstructor=true +Notifiers=true