faure at kde.org
Thu Jan 25 09:45:07 GMT 2007
On Wednesday 24 January 2007 23:41, Matthias Kretz wrote:
> On Wednesday 24 January 2007 17:55, David Faure wrote:
> > On Wednesday 24 January 2007 17:41, Matthias Kretz wrote:
> > > It used to set KGlobal::_instance to 0, but with KGlobal's statics now
> > > private this won't work. I still don't understand why this is necessary,
> > > though.
> > Because kdeinit is what forks other kde processes later on, and those
> > provide their own global instance. So kdeinit wants to create a instance
> > without making it global. A rather special case, but we need to still be
> > able to do that ;) Maybe with a friend declaration or something, to avoid
> > other abuse of that possibility.
> How about a check in the KComponentData ctor to not register with KGlobal if
> the name == "kdeinit4"?
OK with me.
> As the kdeinit code in question is in the main function I'd have to make that
> one a friend or add a public method for everybody to mess with the global
> KComponentData object.
... or the code would have to move into a class just for this purpose ;)
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel