From f47ba9395257a3a808ede62df14794216edb20a6 Mon Sep 17 00:00:00 2001 From: Yari Polla Date: Tue, 14 Mar 2023 15:36:05 +0100 Subject: [PATCH] kcms/hotspot: fix switch --- kcms/hotspot/package/contents/ui/main.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kcms/hotspot/package/contents/ui/main.qml b/kcms/hotspot/package/contents/ui/main.qml index 2e3e004b..67a562aa 100644 --- a/kcms/hotspot/package/contents/ui/main.qml +++ b/kcms/hotspot/package/contents/ui/main.qml @@ -17,15 +17,20 @@ SimpleKCM { id: handler } + PlasmaNM.WirelessStatus { + id: wirelessStatus + } + Kirigami.FormLayout { Controls.Switch { id: hotspotToggle Kirigami.FormData.label: i18n("Enabled:") + checked: wirelessStatus.hotspotSSID.length !== 0 onToggled: { if (hotspotToggle.checked) { - handler.createHotspot() + handler.createHotspot(); } else { - handler.stopHotspot() + handler.stopHotspot(); } } }