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

Thiago Macieira thiago at
Fri Mar 7 18:37:45 GMT 2008

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, the 
effect is now that, if QtDBus cannot connect to the session bus, applications 
(not unique applications) will crash in bizarre ways later on. For instance, 
konqueror crashes trying to contact klauncher, due to a null-pointer 

Does anyone mind if I commit the attached patch, restoring the code that was 

  Thiago Macieira  -  thiago (AT) - thiago (AT)
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Do-exit-if-you-couldn-t-connect-to-the-session-bus.patch
Type: text/x-diff
Size: 903 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list