KDE/kdelibs/kdecore/tests

Clarence Dang dang at kde.org
Thu Oct 4 23:42:50 BST 2007


On Friday 05 October 2007 3:29 am, David Faure wrote:
> Today's quizz: KConfigGroup(c,"").group() == ?
>
> Answered by this unit test: it's "<default>", i.e. the toplevel entries in
> the config files. I thought we had support for the empty group ("[]" in the
> config file) but obviously not. 

The empty group did work for me, even though I considered that a bug (and it 
didn't output any group header like "[]").

> Good I guess, one less thing to support. 
> But then we could get rid of the "<default>" string altogether, and use the
> empty string instead, no?

Yes because KRecentFilesAction depends on it and was broken because 
of "<default>":

void KRecentFilesAction::loadEntries( const KConfigGroup& _config)
[...]
    KConfigGroup cg = _config;
    if ( cg.group().isEmpty())
        cg = KConfigGroup(cg.config(), "RecentFiles");




More information about the kde-core-devel mailing list