From kde-commits Mon Dec 13 11:24:15 2010 From: John Layt Date: Mon, 13 Dec 2010 11:24:15 +0000 To: kde-commits Subject: Re: KDE/kdelibs/kdecore Message-Id: <201012131124.15929.john () layt ! net> X-MARC-Message: https://marc.info/?l=kde-commits&m=129223951421494 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.