Making applications exit if they can't connect to the session bus
coolo at kde.org
Sat Mar 8 08:59:46 GMT 2008
Am Samstag, 8. März 2008 schrieb Thiago Macieira:
> Stephan Kulow wrote:
> >So this exit 125 made testing KDE4 applications from a KDE3 _much_
> > harder and appeared heavily unnecessary - especially creating a core
> > file(!) on missing session bus appeared me a bit _too_ dbus centric.
> If we don't make KApplication exit, then we should protect every and all
> accesses to D-Bus with a check if the application is connected. This
> means that KToolInvocation::klauncher() can now return null, which means
> all uses of it must also be protected. And so forth.
No, you can add a kWarning() << "D-Bus is missing, your apps may crash".
This is much better IMO than writing a core file from within kapp constructor.
More information about the kde-core-devel