[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdelibs/kdecore
From:       John Layt <john () layt ! net>
Date:       2010-12-13 11:24:15
Message-ID: 201012131124.15929.john () layt ! net
[Download RAW message or body]

On Monday 13 December 2010 07:56:40 Oswald Buddenhagen wrote:
> On Mon, Dec 13, 2010 at 02:41:13AM +0100, John Layt wrote:
> > +     * If you specify a configuration file, it has to be valid until the
> > KLocale +     * object is destroyed.
> 
> you realize that this is a behavior-incompatible change? depending on
> the actual usage patterns, this may very well cause crashes.

Yes, I did go through all of svn checking for usage, and the only place these 
get used are in the Locale KCM by me, and in Kraft where they get passed the 
KGlobal::config()->data().  That doesn't cover anything outside svn, but I 
think it makes for a very low-risk behaviour change for now at least.

The other problem with the copy method was the setLocale() would get called on 
the copy not the original, which is both a behaviour change itself in the 
implicit sync()/reparseConfiguration() wouldn't affect the original anymore, 
and I suspect the alternative localized forms wouldn't have been copied over 
causing incorrect settings to be used.

I'll keep poking at this, maybe not taking the copy until the very end of init 
and making it a const to force it read-only (but a blank name should have done 
that anyway?), but I'm still reading my way through the KConfig code to 
understand the side-effects properly :-)

John.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic