Review Request: Make KGlobalSettings reread locale settings before calling settingsChanged().

Lamarque V. Souza lamarque at kde.org
Mon Dec 19 20:49:13 UTC 2011


Em Monday 19 December 2011, David Faure escreveu:
> On Monday 19 December 2011 15:01:51 Lamarque V. Souza wrote:
> > Em Monday 19 December 2011, David Faure escreveu:
> > > On Monday 19 December 2011 15:46:14 Lamarque Vieira Souza wrote:
> > > > > On Dec. 19, 2011, 2:35 p.m., David Faure wrote:
> > > > > > kdeui/kernel/kglobalsettings.cpp, line 886
> > > > > > <http://git.reviewboard.kde.org/r/103469/diff/2/?file=43867#file4
> > > > > > 386 7
> > > > > > lin e886>> >
> > > > > > 
> > > > > >     I like the idea (KGlobalSettings reparsing configuration),
> > > > > >     but not the implementation (setLanguage(langage)). Can't
> > > > > >     KLocale get a reparseConfiguration() (to reuse the KConfig
> > > > > >     naming) ?
> > > > 
> > > > KLocale::reparseConfiguration() would be just a call to
> > > > KLocalePrivate::initFormat(), but initFormat is protected. I will
> > > > have to
> > > > make it public to use it in KLocale::reparseConfiguration, wouldn't
> > > > that break binary compatibility?
> > > 
> > > Aeh? If it's called KLocalePrivate it's a private class, you can do
> > > whatever you want with it.
> > 	
> > 	Well, it's called KLocalePrivate but it has a lot of protected methods
> > 
> > that KLocale cannot access, initFormat is one of them:
> > 
> > ../../kdecore/localization/klocale_p.h: In member function 'void
> > KLocale::reparseConfiguration()':
> > ../../kdecore/localization/klocale_p.h:81:18: error: 'virtual void
> > KLocalePrivate::initFormat()' is protected
> > ../../kdecore/localization/klocale.cpp:786:19: error: within this context
> 
> So make it public. As I said, it's a Private class, there's no possible BIC
> issue with it.
> 
> Of course I trust you that calling it directly is okay, I have no idea
> about that, John Layt would be able to confirm that, though.

	Well, it works here and nothing has crashed so far :-) By the number of 
public and protected sections in KLocalePrivate either everybody is scared to 
organize them or there must be a really nasty bug in there that nobody dares 
to talk about because there is no comment explaining why it is like that.

PS: There are 14 "public:" sections, 10 "protected:" and 2 "private:" in 
KLocalePrivate.

-- 
Lamarque V. Souza
KDE's Network Management maintainer
http://planetkde.org/pt-br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20111219/fc3fa591/attachment-0001.html>


More information about the Plasma-devel mailing list