On Donnerstag, 5. Juli 2007, Xavier wrote: > Hi, > > I have the following bug: > kpowersave crashes when I open the configure dialog box. > > I'm using kpowersave 0.7.2. > > I looked at the code and I have the following clue. > > In file configuredialog.cpp:75 > > // check if brightness is supported > if((brightnessLevels = (hwinfo->getMaxBrightnessLevel()-1)) >= 0) { > brightness_supported = true; > brightness_last = hwinfo->getCurrentBrightnessLevel(); > } > > In my case hwinfo->getMaxBrightnessLevel() returns 1 and then > brightness_supported is set to true and brightnessLevels to 0.
Uh ... what kind of machine is this? Could you attach the output of lshal? I have never seen a machine where HAL return only _one_ level for brightness. > Then, at line 497 of the same file: > brightnessSlider->setLineStep(100/brightnessLevels); > > brightnessLevels' value is still 0 and it crashes (division by 0). > > I don't really know how to fix it to get the correct behaviour but I think > you should know. Yes, I can ;-) Danny _______________________________________________ powersave-devel mailing list powersave-devel@forge.novell.com http://forge.novell.com/mailman/listinfo/powersave-devel