kcms/hotspot: fix switch

This commit is contained in:
Yari Polla 2023-03-14 15:36:05 +01:00
parent 1e2847ef96
commit f47ba93952

View file

@ -17,15 +17,20 @@ SimpleKCM {
id: handler id: handler
} }
PlasmaNM.WirelessStatus {
id: wirelessStatus
}
Kirigami.FormLayout { Kirigami.FormLayout {
Controls.Switch { Controls.Switch {
id: hotspotToggle id: hotspotToggle
Kirigami.FormData.label: i18n("Enabled:") Kirigami.FormData.label: i18n("Enabled:")
checked: wirelessStatus.hotspotSSID.length !== 0
onToggled: { onToggled: {
if (hotspotToggle.checked) { if (hotspotToggle.checked) {
handler.createHotspot() handler.createHotspot();
} else { } else {
handler.stopHotspot() handler.stopHotspot();
} }
} }
} }