branches/work/kinstance-redesign/kdelibs/kinit

David Faure faure at kde.org
Wed Jan 24 16:55:53 GMT 2007


On Wednesday 24 January 2007 17:41, Matthias Kretz wrote:
> SVN commit 626801 by mkretz:
> 
> convert-kinstance.pl
> 
> 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.

> Also kinit creates a global KComponentData object which never gets deleted.
> Intentional? Or shall I make it a K_GLOBAL_STATIC?

Doesn't really matter, kdeinit runs for as long as kde runs... K_GLOBAL_STATIC should be fine, anyhow.

-- 
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 mailing list