[patch] KUniqueApplication: dbus service cleanup for Windows

Jakob Petsovits jpetso at gmx.at
Thu Mar 13 16:24:25 GMT 2008


On Thursday, 13. March 2008, Rafael Fernández López wrote:
> Hi,
>
> > I'm not in a position to comment on your approach, but to avoid the code
> > looking at first sight like '==' has accidentally been written as '=', it
> > would read better as:
> >
> > +  if (QDBusConnection::sessionBus().isConnected()
> > +    && (dbusService = QDBusConnection::sessionBus().interface()) != 0)
>
> Nope, it is fine. It assigns to dbusService the address of the interface,
> and later checks if it was different to NULL. It is fine.

Which is exactly what David's modified version does as well, only explicitly 
(with a "!= 0" check instead of implicit conversion to boolean).

The "=" isn't replaced, it's still where it was before.




More information about the kde-core-devel mailing list