From 3257f5f923733127af1cbdf108ac2d7cf2b9749b Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Thu, 31 Aug 2017 14:36:53 +0200 Subject: [PATCH] [CurrentContainmentActionsModel] Add configurationChanged signal This allows the config UI to know when to enable the Apply button. Currently we only do that when the shortcut or actions themselves change but not their configuration. Differential Revision: https://phabricator.kde.org/D6443 --- shell/currentcontainmentactionsmodel.cpp | 2 ++ shell/currentcontainmentactionsmodel.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/shell/currentcontainmentactionsmodel.cpp b/shell/currentcontainmentactionsmodel.cpp index 3b2a3400a..9636ac5b2 100644 --- a/shell/currentcontainmentactionsmodel.cpp +++ b/shell/currentcontainmentactionsmodel.cpp @@ -222,6 +222,8 @@ void CurrentContainmentActionsModel::showConfiguration(int row, QQuickItem *ctx) pluginInstance->configurationAccepted(); }); + connect(configDlg, &QDialog::accepted, this, &CurrentContainmentActionsModel::configurationChanged); + connect(pluginInstance, &QObject::destroyed, configDlg, &QDialog::reject); configDlg->show(); diff --git a/shell/currentcontainmentactionsmodel.h b/shell/currentcontainmentactionsmodel.h index 86f96f6c6..ef6095c33 100644 --- a/shell/currentcontainmentactionsmodel.h +++ b/shell/currentcontainmentactionsmodel.h @@ -60,6 +60,9 @@ public: Q_INVOKABLE void showAbout(int row, QQuickItem *ctx = nullptr); Q_INVOKABLE void save(); +signals: + void configurationChanged(); + private: Plasma::Containment *m_containment; QHash m_plugins;