Fixed marshalling of the message so we now pass the status back
This commit is contained in:
parent
355c2e1ff8
commit
44e85d73df
1 changed files with 9 additions and 6 deletions
15
kcm/kcm.cpp
15
kcm/kcm.cpp
|
@ -12,6 +12,7 @@
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
#include <KPluginFactory>
|
#include <KPluginFactory>
|
||||||
#include <KPluginMetaData>
|
#include <KPluginMetaData>
|
||||||
|
#include <QMessageBox>
|
||||||
#include <QtWidgets/QListView>
|
#include <QtWidgets/QListView>
|
||||||
#include <kcmutils_version.h>
|
#include <kcmutils_version.h>
|
||||||
|
|
||||||
|
@ -184,16 +185,18 @@ KdeConnectKcm::~KdeConnectKcm()
|
||||||
|
|
||||||
void KdeConnectKcm::refresh()
|
void KdeConnectKcm::refresh()
|
||||||
{
|
{
|
||||||
QStringList providerStatus;
|
QStringList providerStatusToSend;
|
||||||
|
|
||||||
for (int i = 0; i < kcmUi.linkProviders_list->count(); ++i) {
|
for (int i = 0; i < kcmUi.linkProviders_list->count(); ++i) {
|
||||||
QListWidgetItem *item = kcmUi.linkProviders_list->item(i);
|
QListWidgetItem *item = kcmUi.linkProviders_list->item(i);
|
||||||
QString providerStatus = item->checkState() == Qt::Checked ? QStringLiteral("enabled") : QStringLiteral("disabled");
|
QString providerIsEnabled = item->checkState() == Qt::Checked ? QStringLiteral("enabled") : QStringLiteral("disabled");
|
||||||
QString line = item->text() + QStringLiteral("|") + providerStatus;
|
QString line = item->text() + QStringLiteral("|") + providerIsEnabled;
|
||||||
providerStatus.append(line);
|
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();
|
daemon->forceOnNetworkChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue