[PATCH] Add signals support to kconfig_compiler

Cornelius Schumacher schumacher at kde.org
Wed Feb 1 23:33:46 GMT 2006

On Tuesday 31 January 2006 16:03, Michaƫl Larouche wrote:
> This patch add support for signals in kconfig_compiler. What does it means
> ? It means that a changed entry can emit a signal to dispatch it to another
> component.  I needed it in Kopete to replace a old hand-made configuration
> class.

In principle I think this is an useful feature.

> First you need to define a list of signals in the configuration file like
> this.
> <kcfg>
> <signal name="emoticonSettingsChanged" />
> <signal name="styleChanged">
>   <label>Tell when a complete style change.</label>
>     <argument type="String">stylePath</argument>
>     <argument type="String">StyleCSSVariant</argument>
> </signal>
> </kcfg>
> After, add to the entry the signal to emit:
> <entry key="stylePath" type="String">
>   <label>Absolute path to a directory containing a Adium/Kopete chat window
> style.</label>
>   <emit signal="styleChanged" />
> </entry>

Why do you need to define the signal at all? Couldn't we just add an attribute 
'signal="true"' to the "entry" element and then automatically deduce a signal 
"<entryname>Changed" which is emitted when the entry with the name 
<entryname> is changed?

It might also be useful to add a signal which is emitted when any of the 
entries is changed, so that apps which aren't interested in the full 
granularity of changes still can react on changes.

> Patch included also fix to reference files(to make tests pass), the new
> test files, modifications to build system (automake and CMake), addition to
> the Doxygen files.

I haven't looked into all details of the patch, but I'm impressed by the 
completeness (updating all the docs, etc.) :-)

Cornelius Schumacher <schumacher at kde.org>

More information about the kde-core-devel mailing list