diff options
Diffstat (limited to 'desktop/modules')
| -rw-r--r-- | desktop/modules/bluetooth/BluetoothPage.qml | 11 | ||||
| -rw-r--r-- | desktop/modules/network/NetworkPage.qml | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/desktop/modules/bluetooth/BluetoothPage.qml b/desktop/modules/bluetooth/BluetoothPage.qml index b47c506..5bfdc0b 100644 --- a/desktop/modules/bluetooth/BluetoothPage.qml +++ b/desktop/modules/bluetooth/BluetoothPage.qml @@ -82,6 +82,17 @@ Column { text: page.bt.adapter && page.bt.adapter.discovering ? "Stop scan" : "Scan" onClicked: if (page.bt.adapter) page.bt.adapter.discovering = !page.bt.adapter.discovering } + + // BlueZ discovery runs until stopped, and closing the drawer does not + // stop it, so a forgotten scan keeps the radio busy for the session. + // Bound to the property rather than started by the button: a manual + // stop cancels the clock, and reopening the page re-arms a fresh 60s + // on a scan still running from before. + Timer { + interval: 60000 + running: page.bt.adapter ? page.bt.adapter.discovering : false + onTriggered: if (page.bt.adapter) page.bt.adapter.discovering = false + } } // --- Connected --- diff --git a/desktop/modules/network/NetworkPage.qml b/desktop/modules/network/NetworkPage.qml index 975e68c..3749688 100644 --- a/desktop/modules/network/NetworkPage.qml +++ b/desktop/modules/network/NetworkPage.qml @@ -127,6 +127,15 @@ Column { text: page.net.wifiDevice && page.net.wifiDevice.scannerEnabled ? "Scanning…" : "Scan" onClicked: if (page.net.wifiDevice) page.net.wifiDevice.scannerEnabled = !page.net.wifiDevice.scannerEnabled } + + // The scanner repeats until disabled, and closing the drawer does not + // disable it. A continuous scan also costs throughput on the connected + // link. See the matching timer in BluetoothPage. + Timer { + interval: 60000 + running: page.net.wifiDevice ? page.net.wifiDevice.scannerEnabled : false + onTriggered: if (page.net.wifiDevice) page.net.wifiDevice.scannerEnabled = false + } } Repeater { |
