[Interest] Are slots even needed these days?

André Pönitz apoenitz at t-online.de
Thu Mar 17 00:22:11 CET 2016


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'



More information about the Interest mailing list