Matthias Kretz kretz at
Wed Jan 24 22:41:09 GMT 2007

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"?
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.

Matthias Kretz (Germany)                            <><
MatthiasKretz at, kretz at,
Matthias.Kretz at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list