From 2a4bd3dfdd757d99bdbf5cb30719f109aaa13dfc Mon Sep 17 00:00:00 2001 From: zach Date: Thu, 2 Jul 2026 21:58:01 +0200 Subject: [PATCH] chore: remove old code --- Helpers/Network.qml | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/Helpers/Network.qml b/Helpers/Network.qml index 593c34d..695fa0f 100644 --- a/Helpers/Network.qml +++ b/Helpers/Network.qml @@ -10,62 +10,21 @@ Singleton { property bool active: false readonly property list devices: Networking.devices.values readonly property list knownNetworks: networks.filter(n => n.known) - - // Original code - - readonly property list netDevice: Networking.devices.values - readonly property string networkName: getNetworkName() readonly property list networks: { const list = []; for (const d of wifiDevices) list.push(...d.networks.values); return list; } - readonly property list nicNames: networkInterfaceCardNames() property bool scanning: false readonly property list unknownNetworks: networks.filter(n => !n.known) readonly property list wifiDevices: devices.filter(d => wifiDevice(d)) readonly property bool wifiEnabled: Networking.wifiEnabled - // Useless will prob remove - function getConnectedDevices() { - let connectedDevices = []; - - for (var i = 0; i < netDevice.length; i++) { - if (netDevice[i].connected === true) { - connectedDevices.push(netDevice[i].name); - } - } - return connectedDevices; - } - - // SHOULD retrieve network names of connected devices - // Currently only gives connected nic name - function getNetworkName() { - const devices = netDevice.filter(device => device.connected === true); - for (var i = 0; i < devices.length; i++) { - return devices[i].name; - } - return "Failed network name"; - } - - // - function isSecure(security): bool { return (security === WifiSecurityType.WpaPsk || security === WifiSecurityType.Wpa2Psk || security === WifiSecurityType.Sae); } - // Searches wired/wireless devices and sets them in a list - function networkInterfaceCardNames() { - let nicList = []; - - for (let i = 0; i < netDevice.length; ++i) { - nicList.push(netDevice[i].name); - } - - return nicList; - } - function setScan(value: bool): void { for (const d of wifiDevices) { d.scannerEnabled = value;