Trying to get end-to-end of the link providers out so we can pass back
lists
This commit is contained in:
parent
635024d968
commit
01897942a0
2 changed files with 27 additions and 0 deletions
17
kcm/kcm.cpp
17
kcm/kcm.cpp
|
@ -92,6 +92,23 @@ KdeConnectKcm::KdeConnectKcm(QObject *parent, const KPluginMetaData &md, const Q
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
this);
|
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_edit, &QLineEdit::setText);
|
||||||
connect(daemon, &DaemonDbusInterface::announcedNameChanged, kcmUi.rename_label, &QLabel::setText);
|
connect(daemon, &DaemonDbusInterface::announcedNameChanged, kcmUi.rename_label, &QLabel::setText);
|
||||||
setRenameMode(false);
|
setRenameMode(false);
|
||||||
|
|
10
kcm/kcm.ui
10
kcm/kcm.ui
|
@ -121,6 +121,16 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
<item>
|
||||||
<widget class="QPushButton" name="refresh_button">
|
<widget class="QPushButton" name="refresh_button">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
Loading…
Reference in a new issue