From 44e85d73df3c012f4974237eeffd65da5b05f3eb Mon Sep 17 00:00:00 2001 From: Rob Emery Date: Sat, 5 Oct 2024 19:30:55 +0100 Subject: [PATCH] Fixed marshalling of the message so we now pass the status back --- kcm/kcm.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp index 48893e6b1..1c5375684 100644 --- a/kcm/kcm.cpp +++ b/kcm/kcm.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -184,16 +185,18 @@ KdeConnectKcm::~KdeConnectKcm() void KdeConnectKcm::refresh() { - QStringList providerStatus; - + QStringList providerStatusToSend; for (int i = 0; i < kcmUi.linkProviders_list->count(); ++i) { QListWidgetItem *item = kcmUi.linkProviders_list->item(i); - QString providerStatus = item->checkState() == Qt::Checked ? QStringLiteral("enabled") : QStringLiteral("disabled"); - QString line = item->text() + QStringLiteral("|") + providerStatus; - providerStatus.append(line); + QString providerIsEnabled = item->checkState() == Qt::Checked ? QStringLiteral("enabled") : QStringLiteral("disabled"); + QString line = item->text() + QStringLiteral("|") + providerIsEnabled; + providerStatusToSend.append(line); + // QMessageBox::information(widget(), QStringLiteral("thisLine"), line, QMessageBox::StandardButton::NoButton); } - daemon->setProviderStatus(providerStatus); + // QMessageBox::information(widget(), QStringLiteral("ProviderStatus"),providerStatusToSend.join(QStringLiteral("")), + // QMessageBox::StandardButton::NoButton); + daemon->setProviderStatus(providerStatusToSend); daemon->forceOnNetworkChange(); }