diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp index 660547ef1..42facfa9d 100644 --- a/kcm/kcm.cpp +++ b/kcm/kcm.cpp @@ -134,6 +134,7 @@ KdeConnectKcm::KdeConnectKcm(QObject *parent, const KPluginMetaData &md, const Q connect(kcmUi.renameDone_button, &QAbstractButton::clicked, this, &KdeConnectKcm::renameDone); connect(kcmUi.renameShow_button, &QAbstractButton::clicked, this, &KdeConnectKcm::renameShow); connect(kcmUi.pluginSelector, &KPluginWidget::changed, this, &KdeConnectKcm::pluginsConfigChanged); + connect(kcmUi.backend_apply_button, &QAbstractButton::clicked, this, &KdeConnectKcm::saveBackends); if (!args.isEmpty() && !args.first().isNull() && args.first().canConvert()) { const QString input = args.first().toString(); @@ -183,6 +184,11 @@ KdeConnectKcm::~KdeConnectKcm() } void KdeConnectKcm::refresh() +{ + daemon->forceOnNetworkChange(); +} + +void KdeConnectKcm::saveBackends() { QStringList providerStatusToSend; for (int i = 0; i < kcmUi.linkProviders_list->count(); ++i) { @@ -193,7 +199,6 @@ void KdeConnectKcm::refresh() } daemon->setProviderStatus(providerStatusToSend); - daemon->forceOnNetworkChange(); } void KdeConnectKcm::deviceSelected(const QString &deviceId) diff --git a/kcm/kcm.h b/kcm/kcm.h index 7d2a9d574..ef868bdaf 100644 --- a/kcm/kcm.h +++ b/kcm/kcm.h @@ -36,6 +36,7 @@ private Q_SLOTS: void sendPing(); void pairingFailed(const QString &error); void refresh(); + void saveBackends(); void renameShow(); void renameDone(); void setRenameMode(bool b); diff --git a/kcm/kcm.ui b/kcm/kcm.ui index d6882184b..c3fa96a67 100644 --- a/kcm/kcm.ui +++ b/kcm/kcm.ui @@ -6,7 +6,7 @@ 0 0 - 1130 + 1143 740 @@ -65,6 +65,9 @@ + + Qt::Vertical + 40 @@ -121,6 +124,13 @@ + + + + Refresh + + + @@ -132,9 +142,9 @@ - + - Refresh + Apply @@ -229,6 +239,9 @@ + + Qt::Vertical + 40 @@ -254,6 +267,9 @@ + + Qt::Vertical + 40