[Qt-creator] Proposals for Updating the Qt Creator Coding Style

Joerg Bornemann joerg.bornemann at digia.com
Thu Oct 2 14:23:17 CEST 2014


On 02-Oct-14 11:30, Daniel Teske wrote:

> a->connect(b, &B::sig, &A::slot),
>
> calls the *static* connect method, that takes no context object, so the
> connection is not removed if "a" is deleted.

It's even worse: the connection is from b to b and not from b to a as 
expected. Luckily, this doesn't even compile if A and B are unrelated 
classes.

I wonder why we have those static connect(sender, ..., sender, ...) 
"convenience" overloads at all. This is utterly confusing as the 
non-static variant connects from sender to this.


BR,

Joerg




More information about the Qt-creator mailing list