Merging settings by group in KConfig
Olivier Goffart
ogoffart at kde.org
Sun Apr 2 21:44:22 BST 2006
Le Dimanche 2 Avril 2006 22:13, Matt Rogers a écrit :
> Hi,
>
> For KDE4, I think it would be nice to be able to do the following:
>
> Specify a group of settings which should be used as default settings for a
> particular thing. Then, allow other groups to derive their settings from
> that group. If a certain configuration key is not present in the derived
> group, the default setting takes over. Otherwise, the derived group has
> precedent.
>
> The use case for this is Kopete chat settings. A user is chatting with a
> contact. The particular service they're chatting over supports a set of
> features, rich text for example. The user can turn off rich text. However,
> the next time that the user goes back to chat with that person, rich text
> is reenabled.
>
> Questions and comments welcome.
I was needing similar thing for KNotify (see KNotifyConfig::readEntry in
kdelibs/knotify/deamon)
(But my implementation in KNotify is specific for KNotify)
The idea is to have subgroup:
[foo]
...
[foo/A]
...
[foo/B]
...
[foo/B/bar]
...
And to move up in the hierarchy when looking for a key until we found it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060402/211bb23c/attachment.sig>
More information about the kde-core-devel
mailing list