[PATCH] KCoreConfigSkeleton

Oswald Buddenhagen ossi at kde.org
Sat Nov 24 17:09:56 GMT 2007


On Sat, Nov 24, 2007 at 09:08:27AM -0700, Aaron J. Seigo wrote:
> there's an additional problem now that we have nested groups as well:
> config objects may not start at the root of the file.  right now
> KConfigSkeleton assumes it owns the entire file and there is no way to
> make it start from a given sub-group that i can find since it takes a
> KSharedConfig::Ptr in the constructors ...
>
> then there are methods like writeConfig(KConfig * config) ...
> shouldn't those take a KConfigBase* isntead? that would at least make
> it possible to extend to allow applying a KConfigSkeleton to a config
> object starting at a non-root group.
> 
hmm, that's an interesting topic.
the nested groups are no problem as such - the code can be extended to
deal with it.
the actual issue you have is that the whole stuff assumes a static
structure from the root down and defines the file to be the root, while
you want to pass some subsection as the root.
i don't see a fundamental issue with passing KConfigBase instead of
KConfig. however, this needs to be checked for side effects. i think at
least the kcfg file needs to mark those groups as dynamic, either
entirely dynamic or with some pattern the group name should comply with.
otherwise, for example, the legendary kcfgedit would try to put it in
the root of a file.

note that instead of changing the "supply type" now, we can later add
KConfigGroup overloads in a SC & BC way, so this isn't a "must do now"
thing as far as the libs go. not that's i'm opposed to going into this
further - and after all you have an immediate need - i just thought i'd
mention it, as i expected you to be the one to impale me for making the
original proposal in the first place. ;)

> i also noted that there are virtual methods that are inline in the header. 
> shouldn't those go into the implementation?
> 
that's because its templated stuff, i think. i haven't touched this, so
i don't know.

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.




More information about the kde-core-devel mailing list