[Interest] Are slots even needed these days?
Bob Hood
bhood2 at comcast.net
Thu Mar 17 00:46:19 CET 2016
On 3/16/2016 5:02 PM, Scott Aron Bloom wrote:
> I find them both pretty bad L… I have spent too much time, looking at other
> people’s code trying to figure out “why” it wont connect, only to realize
> someone had snuck in a “private:” second so moc didn’t generate the slot
> information.
>
> I prefer “slotFoo” and “slotBar” as well as “sigFoo” and “sigBar”
>
>
> It really lets the methods stand out as slots and signals.. It also means,
> don’t think “sender()” can ever valid if you are not in a “slotXYZ” function.
>
>
I actually prefix my slot method names with "slot_" and signals with "signal_"
so they are also easily identifiable in the C++ module as I'm looking through
the code. More self-documentation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160316/ef0e790e/attachment.html>
More information about the Interest
mailing list