Trying to get end-to-end of the link providers out so we can pass back

lists
This commit is contained in:
Rob Emery 2024-10-05 10:19:33 +01:00 committed by Carl Schwan
parent 635024d968
commit 01897942a0
No known key found for this signature in database
GPG key ID: 02325448204E452A
2 changed files with 27 additions and 0 deletions

View file

@ -92,6 +92,23 @@ KdeConnectKcm::KdeConnectKcm(QObject *parent, const KPluginMetaData &md, const Q
}
},
this);
kcmUi.bluetoothEnabled_checkbox->setChecked(false);
setWhenAvailable(
daemon->linkProviders(),
[this](bool error, const QStringList linkProviders) {
for (int i = 0; i < linkProviders.size(); ++i) {
QString linkProvider = QString(linkProviders.at(i).constData());
qDebug() << "link provider: " << linkProvider;
if (linkProvider == QStringLiteral("bluetooth")) {
kcmUi.bluetoothEnabled_checkbox->setChecked(true);
}
}
},
this);
connect(daemon, &DaemonDbusInterface::announcedNameChanged, kcmUi.rename_edit, &QLineEdit::setText);
connect(daemon, &DaemonDbusInterface::announcedNameChanged, kcmUi.rename_label, &QLabel::setText);
setRenameMode(false);

View file

@ -121,6 +121,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="bluetoothEnabled_checkbox">
<property name="text">
<string>Bluetooth Enabled</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="refresh_button">
<property name="text">