Commit c07f1381 authored by Oliver Henshaw's avatar Oliver Henshaw
Browse files

Suspend idle timeouts are stored in milliseconds

Was storing in centiseconds(?) and in seconds in one place.

Meant that suspend was activated much too soon. Suspend timeouts are
currently commented out due this problem but should work properly when
or if they are re-enabled.

BUG: 310506
CCBUG: 304877
parent 7c33ee0a
......@@ -240,9 +240,9 @@ Item {
id: suspendSwitch
onCheckedChanged: {
if (checked) {
batterySuspendConfig.writeEntry("idleTime", Math.round(suspendTimeSlider.value)*60*100)
lowBatterySuspendConfig.writeEntry("idleTime", Math.round(suspendTimeSlider.value)*60*100)
acSuspendConfig.writeEntry("idleTime", Math.round(suspendTimeSlider.value)*60)
batterySuspendConfig.writeEntry("idleTime", Math.round(suspendTimeSlider.value)*60*1000)
lowBatterySuspendConfig.writeEntry("idleTime", Math.round(suspendTimeSlider.value)*60*1000)
acSuspendConfig.writeEntry("idleTime", Math.round(suspendTimeSlider.value)*60*1000)
} else {
batterySuspendConfig.deleteEntry("idleTime")
lowBatterySuspendConfig.deleteEntry("idleTime")
......@@ -258,12 +258,12 @@ Item {
maximumValue: 60
onValueChanged: {
if (suspendSwitch.checked) {
batterySuspendConfig.writeEntry("idleTime", Math.round(value)*60*100)
lowBatterySuspendConfig.writeEntry("idleTime", Math.round(value)*60*100)
acSuspendConfig.writeEntry("idleTime", Math.round(value)*60*100)
batterySuspendConfig.writeEntry("idleTime", Math.round(value)*60*1000)
lowBatterySuspendConfig.writeEntry("idleTime", Math.round(value)*60*1000)
acSuspendConfig.writeEntry("idleTime", Math.round(value)*60*1000)
}
}
Component.onCompleted: value = batterySuspendConfig.readEntry("idleTime")/60/100
Component.onCompleted: value = batterySuspendConfig.readEntry("idleTime")/60/1000
}
PlasmaComponents.Label {
enabled: suspendTimeSlider.checked
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment