Adding dedicated button for backend saving
This commit is contained in:
parent
27f5882dc1
commit
5895daf612
3 changed files with 26 additions and 4 deletions
|
@ -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<QString>()) {
|
||||
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)
|
||||
|
|
|
@ -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);
|
||||
|
|
22
kcm/kcm.ui
22
kcm/kcm.ui
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1130</width>
|
||||
<width>1143</width>
|
||||
<height>740</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -65,6 +65,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
|
@ -121,6 +124,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="refresh_button">
|
||||
<property name="text">
|
||||
<string>Refresh</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
|
@ -132,9 +142,9 @@
|
|||
<widget class="QListWidget" name="linkProviders_list"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="refresh_button">
|
||||
<widget class="QPushButton" name="backend_apply_button">
|
||||
<property name="text">
|
||||
<string>Refresh</string>
|
||||
<string>Apply</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -229,6 +239,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
|
@ -254,6 +267,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
|
|
Loading…
Reference in a new issue