Wiring this up to send through, looks like the array is empty for some
reason that I'm not seeing at a glance at current
This commit is contained in:
parent
e97461937c
commit
355c2e1ff8
3 changed files with 22 additions and 0 deletions
|
@ -158,6 +158,15 @@ QStringList Daemon::linkProviders() const
|
|||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
void Daemon::setProviderStatus(const QStringList &providerStatus)
|
||||
{
|
||||
qCDebug(KDECONNECT_CORE) << "setProviderStatus called" << providerStatus;
|
||||
for (const auto &i : providerStatus) {
|
||||
qCDebug(KDECONNECT_CORE) << "setProviderstatus with: " << i;
|
||||
}
|
||||
}
|
||||
|
||||
QStringList Daemon::devices(bool onlyReachable, bool onlyTrusted) const
|
||||
{
|
||||
QStringList ret;
|
||||
|
|
|
@ -64,7 +64,10 @@ public Q_SLOTS:
|
|||
Q_SCRIPTABLE QMap<QString, QString> deviceNames(bool onlyReachable = false, bool onlyPaired = false) const;
|
||||
|
||||
Q_SCRIPTABLE QString deviceIdByName(const QString &name) const;
|
||||
|
||||
Q_SCRIPTABLE QStringList linkProviders() const;
|
||||
Q_SCRIPTABLE void setProviderStatus(const QStringList &providerStatus);
|
||||
|
||||
Q_SCRIPTABLE virtual void sendSimpleNotification(const QString &eventId, const QString &title, const QString &text, const QString &iconName) = 0;
|
||||
|
||||
Q_SIGNALS:
|
||||
|
|
10
kcm/kcm.cpp
10
kcm/kcm.cpp
|
@ -184,6 +184,16 @@ KdeConnectKcm::~KdeConnectKcm()
|
|||
|
||||
void KdeConnectKcm::refresh()
|
||||
{
|
||||
QStringList providerStatus;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
daemon->setProviderStatus(providerStatus);
|
||||
daemon->forceOnNetworkChange();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue