diff --git a/kcms/notifications/kcm.h b/kcms/notifications/kcm.h --- a/kcms/notifications/kcm.h +++ b/kcms/notifications/kcm.h @@ -20,16 +20,16 @@ #pragma once -#include +#include class SourcesModel; class FilterProxyModel; namespace NotificationManager { class Settings; } -class KCMNotifications : public KQuickAddons::ConfigModule +class KCMNotifications : public KQuickAddons::ManagedConfigModule { Q_OBJECT diff --git a/kcms/notifications/kcm.cpp b/kcms/notifications/kcm.cpp --- a/kcms/notifications/kcm.cpp +++ b/kcms/notifications/kcm.cpp @@ -47,7 +47,7 @@ K_PLUGIN_FACTORY_WITH_JSON(KCMNotificationsFactory, "kcm_notifications.json", registerPlugin();) KCMNotifications::KCMNotifications(QObject *parent, const QVariantList &args) - : KQuickAddons::ConfigModule(parent, args) + : KQuickAddons::ManagedConfigModule(parent, args) , m_sourcesModel(new SourcesModel(this)) , m_filteredModel(new FilterProxyModel(this)) , m_settings(new NotificationManager::Settings(this)) @@ -88,6 +88,11 @@ setInitialDesktopEntry(parser.value(desktopEntryOption)); setInitialNotifyRcName(parser.value(notifyRcNameOption)); setInitialEventId(parser.value(eventIdOption)); + + const auto skeletons = m_settings->configSkeletons(); + for (const auto skeleton : skeletons) { + registerSettings(skeleton); + } } KCMNotifications::~KCMNotifications() @@ -193,16 +198,19 @@ void KCMNotifications::load() { + ManagedConfigModule::load(); m_settings->load(); } void KCMNotifications::save() { + ManagedConfigModule::save(); m_settings->save(); } void KCMNotifications::defaults() { + ManagedConfigModule::defaults(); m_settings->defaults(); } diff --git a/kcms/notifications/package/contents/ui/main.qml b/kcms/notifications/package/contents/ui/main.qml --- a/kcms/notifications/package/contents/ui/main.qml +++ b/kcms/notifications/package/contents/ui/main.qml @@ -29,7 +29,7 @@ KCM.SimpleKCM { id: root KCM.ConfigModule.quickHelp: i18n("This module lets you manage application and system notifications.") - KCM.ConfigModule.buttons: KCM.ConfigModule.Help | KCM.ConfigModule.Apply + // Sidebar on SourcesPage is 1/3 of the width at a minimum of 12, so assume 3 * 12 = 36 as preferred implicitWidth: Kirigami.Units.gridUnit * 36