[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [PATCH] Allow reading of values on invalid KConfigGroups
From: Sebastian =?iso-8859-1?q?Tr=FCg?= <trueg () kde ! org>
Date: 2009-02-24 12:47:09
Message-ID: 200902241347.10336.trueg () kde ! org
[Download RAW message or body]
On Tuesday 24 February 2009 09:58:27 Oswald Buddenhagen wrote:
> On Mon, Feb 23, 2009 at 10:02:26PM +0100, Sebastian Trüg wrote:
> > The attached patch allows to read values from invalid KConfigGroups
> > instead of throughing an assert. This allows to reuse typical
> > loadSettings(const KConfigGroup&) methods for loading of defaults. In my
> > case it allowed to remove a lot of code duplication from K3b.
> >
> > Comments?
>
> +1 as far as i'm concerned.
OK, great. Actually I thought I did not even send this email. KMail troubles.
In the end I solved it another way: I simply call setReadDefaults(true) on the
global config before calling the loadConfig methods. This has the additional
advantage that one can change the defaults by installing a global config file
(not that anyone will ever do this ;)
I still think, however, that this patch makes sense. Should I wait for more
comments or go ahead?
> btw, it makes sense to create such patches with diff -b. if you have a
> minor glitch somewhere, nobody would be able to spot it with the patch
> being as is.
> a copy without -b to check the indentation is needed as well, of course.
>
> :)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic