kdeinit launching in KApplication

Lubos Lunak l.lunak at suse.cz
Sat Aug 4 08:19:22 BST 2007


On pá 3. srpna 2007, David Faure wrote:
> On Friday 03 August 2007, Andreas Pakulat wrote:
> > On 03.08.07 13:36:08, Lubos Lunak wrote:
> > >  is there any special reason why kdeinit&friends are not automatically
> > > launched from KApplication ctor like it is in KDE3 (besides this
> > > feature getting lost while porting to DBUS)? Right now e.g. global
> > > shortcuts don't work, since they require kded and automatically assume
> > > it's always there. Are such things now supposed to explicitly launch
> > > kdeinit if needed, since KApplication is now not mandatory?
> >
> > They are launched when they are needed I think. A plain basic kapp
> > doesn't start it, but it seems its started when needed, for example
> > kdevelop triggers kdeinit and kded start. So I guess this change is
> > intentional so not to start uneeded services...
>
> Yes it does work; ktoolinvocation and ksycoca start kdeinit when necessary,
> the "global shortcuts" code should just do the same.

 It could, but should it? I'd expect that pretty much every KDE developer 
simply runs apps inside KDE session, where this magically works, so it's 
bound to get broken occassionally (or just think porting from KDE3 where it 
worked everywhere).

 Using e.g. dbus activation would be safer. I however cannot find where 
KNotify does this and I also seem to remember there was supposed to be some 
problem with activation - does somebody know the details?

> KToolInvocation::klauncher();  is the magic incantation that ksycoca uses.

 Yeah, there's nothing like calling klauncher() when one wants kded :).

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http//www.suse.cz




More information about the kde-core-devel mailing list