KLed::setColor() not working?

Jason Harris kstars at 30doradus.org
Sun Jun 27 21:47:19 BST 2004


In KStars, we indicate the status of a connection with an external 
device using the color of a KLed object (i.e., grey=inactive, 
green=connected, red=error).  We recently noticed that these LEDs are 
no longer working as they used to, and traced it to the commit on 21 
May ("antialiasing of round LED shapes" ).  Before this commit, our 
LEDs change color; after this commit, they are always grey.

I put together a very small test program that illustrates the problem:

If you compile this against latest kdelibs, then pressing the "Change 
Color" button does nothing.  

If you add the line:
  light->setShape( KLed::Rectangular );

to the TestWidget ctor, then the LED changes colors properly.  Also, if 
you downgrade kled.h to 1.29 and kled.cpp to 1.28 (the versions 
directly prior to the 21 May commit) and use the libkdeui generated 
from them, then the LED changes color properly, even when it is 

Seems to be a bug in KLed, but I'm not familiar enough with that code to 
see the problem immediately.

kind regards,

KStars: A KDE Planetarium

More information about the kde-core-devel mailing list