[Interest] Are slots even needed these days?
Scott Aron Bloom
scott at towel42.com
Thu Mar 17 00:27:04 CET 2016
-----Original Message-----
From: André Pönitz [mailto:apoenitz at t-online.de]
Sent: Wednesday, March 16, 2016 4:22 PM
To: Scott Aron Bloom
Cc: Bob Hood; interest at qt-project.org
Subject: Re: [Interest] Are slots even needed these days?
On Wed, Mar 16, 2016 at 11:02:17PM +0000, Scott Aron Bloom wrote:
> 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.
sender() is pretty much never needed needed with lambda connects, as the sender can be passed explicitly in the connect() call. This also removes the typical need to qobject_cast<> the sender, as the correct type is available directly.
Andre'
=========
Ahh.. good point.. Truth is, I have too many side projects stuck using the old method.
However, I would still prefer the "slot" and "sig" prefix for clarity...
More information about the Interest
mailing list