kdebase/kcontrol
Simon Hausmann
hausmann at kde.org
Sat Sep 20 17:56:38 BST 2003
On Thu, Sep 18, 2003 at 12:37:46PM +0200, Matthias Kretz wrote:
> Thanks, for fixing these KCMs. But still the problem remains that there might
> be other (third party) KCMs out there with the same problem, that's why I
> need to know what's breaking your KControl.
>
> I did not break src compat, I kind of broke behaviour compat (and I tried to
> explain that before). Since I fixed both KCMultiDialog and ProxyWidget (and
> Lubos fixed KCDialog) this should be no issue.
>
> I'll try to explain once more what's causing this:
> KControl creates the KCM and only after that it can connect to the
> changed(bool) signal. If a KCM is broken and calls setChanged(true) in the
> ctor the changed(true) signal will not be emitted again until
> setChanged(false) and setChanged(true) is called. To fix this all classes
> using KCModule need to check for KCModule::changed() after the KCM ctor was
> called and enable/disable buttons accordingly.
A hack to work around this would be to connect the signal to a
parent widget's slot in the kcmodule constructor, if the slot exists
(one kcontrol would provide, or whatever the container is) .
If one doesn't want to hardcode the slot name it could be provided
as Qt property by the parent.
Simon
More information about the kde-core-devel
mailing list