[patch] KUniqueApplication: dbus service cleanup for Windows
Rafael Fernández López
ereslibre at kde.org
Thu Mar 13 15:50:51 CET 2008
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.
In other case (using ==), you would be generating a boolean expression. Is a
different thing.
This is the same as writing:
if (QDBusConnection::sessionBus().isConnected()) {
dbusService = QDBusConnection::sessionBus().interface();
if (dbusService) {
...
}
}
Bye,
Rafael Fernández López
GPG Fingerprint: B9F4 4730 43F8 FFDD CC5E BA8E 724E 406E 3F01 D070
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-windows/attachments/20080313/acd57ca0/attachment.pgp
More information about the Kde-windows
mailing list