Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/main.qml
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | 27 | Item { | |||
---|---|---|---|---|---|
69 | } | 69 | } | ||
70 | 70 | | |||
71 | PlasmaNM.ConnectionIcon { | 71 | PlasmaNM.ConnectionIcon { | ||
72 | id: connectionIconProvider | 72 | id: connectionIconProvider | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | PlasmaNM.Handler { | 75 | PlasmaNM.Handler { | ||
76 | id: handler | 76 | id: handler | ||
77 | onWirelessScanTimerEnabled: { | | |||
jgrulich: I wonder whether the timer in the applet itself should be running if we fail to scan, I think… | |||||
jgrulich: What about this? | |||||
I removed this because 1: 2: meven: I removed this because
1:
Request scan failure should never happen anymore because the… | |||||
@jgrulich Any feedback ? meven: @jgrulich Any feedback ?
You approved this a while back but we still have this point to deal… | |||||
78 | if (enabled) { | | |||
79 | scanTimer.restart() | | |||
80 | } else { | | |||
81 | scanTimer.stop() | | |||
82 | } | | |||
83 | } | | |||
84 | } | 77 | } | ||
85 | 78 | | |||
86 | Timer { | 79 | Timer { | ||
87 | id: scanTimer | 80 | id: scanTimer | ||
88 | interval: 15000 | 81 | interval: 10200 | ||
89 | repeat: true | 82 | repeat: true | ||
90 | running: plasmoid.expanded && !connectionIconProvider.airplaneMode | 83 | running: plasmoid.expanded && !connectionIconProvider.airplaneMode | ||
91 | 84 | | |||
92 | onTriggered: handler.requestScan() | 85 | onTriggered: handler.requestScan() | ||
93 | } | 86 | } | ||
94 | 87 | | |||
95 | PlasmaNM.Configuration { | 88 | PlasmaNM.Configuration { | ||
96 | id: configuration | 89 | id: configuration | ||
97 | unlockModemOnDetection: plasmoid.configuration.unlockModemOnDetection | 90 | unlockModemOnDetection: plasmoid.configuration.unlockModemOnDetection | ||
98 | manageVirtualConnections: plasmoid.configuration.manageVirtualConnections | 91 | manageVirtualConnections: plasmoid.configuration.manageVirtualConnections | ||
99 | } | 92 | } | ||
100 | } | 93 | } |
I wonder whether the timer in the applet itself should be running if we fail to scan, I think it should be stopped when we fail and resumed again when a successful scan was done. If I do get it correctly and we fail to do a scan, we schedule a new one in e.g. 5 seconds, after 5 seconds we perform a successful one, but after another 5 seconds this timer will perform a new one and fail again. Stopping this timer when we fail to scan and resuming it later will result into higher ration of successful scans, am I right?