[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Merging settings by group in KConfig
From: Matt Rogers <mattr () kde ! org>
Date: 2006-04-04 17:21:30
Message-ID: 20060404172130.GA18226 () shocker ! internal
[Download RAW message or body]
On Mon, Apr 03, 2006 at 08:56:28PM +0200, David Faure wrote:
> On Monday 03 April 2006 20:27, Matt Rogers wrote:
> > config->setGroup( "Chatwindow:FooContact", "Chatwindow" );
> setGroup is deprecated in favour of using KConfigGroup; setGroup
> is too dangerous since it changes the state of KConfig.
>
for kde 4 only or for kde 3 as well? this is still KDE3 code i'm working
with ATM.
> > //read an entry. if no entry for the key exists in the real group
> > //read the entry from the default group, and if no entry exists there
> > //use the specified default.
> > config->readEntry("OverriddenKey", "Default"); //returns "NotDefault"
>
> I'm wondering if this shouldn't be done why this can't be done by an extra layer
> above KConfigGroup... Something like
> KConfigGroupWithDefault myGroup( "Chatwindow:FooContact", "Chatwindow" );
> myGroup.readEntry("OverriddenKey", "Default");
> Should be easy to implement, e.g. with two KConfigGroups as member,
> or by deriving from KConfigGroup and adding fallback-lookup.
>
ahh, neat. i'll see if i can't take a stab at this in the next day or
two.
Thanks!
--
Matt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic