Making applications exit if they can't connect to the session bus

Stephan Kulow coolo at kde.org
Fri Mar 7 18:49:20 GMT 2008


Am Freitag, 7. März 2008 schrieb Thiago Macieira:
> I don't understand why, but r635466 had this patch in it:
>    if (!QDBusConnection::sessionBus().isConnected() || !(bus =
> QDBusConnection::sessionBus().interface())) {
> -      kFatal(101) << "Session bus not found" << endl;
> -      ::exit(125);
>    }
>
> It looks to me that Coolo committed some testing code of his. In any case,
No, I can tell you why I commited this: because kpat (yeah, yeah - random app
not being hardcore to the desktop) does not need dbus's session bus unless it
does bizzare things like opening files (not very common) or display errors 
(using knotify - even less common).

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.

Greetings, Stephan




More information about the kde-core-devel mailing list