https://bugzilla.novell.com/show_bug.cgi?id=395042
User mvidner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=395042#c13
--- Comment #13 from Martin Vidner 2008-06-03 05:41:01 MDT ---
Aha, this is getting interesting.
What I set in the preferences is consistently reflected in the config file:
If I set Sleep to S2D, the config is OK (ActionOnSleepButton=SUSPEND2DISK). But
if I set it to S2R, the key is missing from the config file. If I set it to
empty, it has empty value. Similarly ActionOnS2DiskButton becomes missing if it
is set to S2D. Apparently the config omits the setting if it is at the
"default" value.
But it only acts upon the settings until I change it in the preference dialog.
Started kpowersave, with sleep set to S2R.
pressed [sleep] -> S2R, ok
changed sleep to S2D
pressed [sleep] -> S2R again
changed sleep to nothing
pressed [sleep] -> S2D(!)
changed sleep to S2R
pressed [sleep] -> nothing
changed sleep to nothing
pressed [sleep] -> nothing
So actually it seems to act on the *old* value of the widget, except at the
end.
the first time after it starts. Otherwise it logs the action as -1.
BTW, this is probably unrelated, but let me piggyback it:
==14101== Conditional jump or move depends on uninitialised value(s)
==14101== at 0x40EDFE5: BatteryCollection::refreshInfo(QPtrList<Battery>,
bool) (hardware_batteryCollection.cpp:181)
==14101== by 0x40C8A9A: HardwareInfo::setPrimaryBatteriesWarningLevel(int,
int, int) (hardware.cpp:518)
==14101== by 0x40C946D: HardwareInfo::updatePrimaryBatteries()
(hardware.cpp:953)
==14101== by 0x40D6A8A: HardwareInfo::HardwareInfo() (hardware.cpp:93)
==14101== by 0x4123B94: kpowersave::kpowersave(bool, bool)
(kpowersave.cpp:63)
==14101== by 0x412B2DF: kdemain (main.cpp:88)
==14101== by 0x8048791: main (kdeinit_kpowersave.cpp:2)
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.