[Development] Proposal to change connectSlotsByName behavior

Marc Mutz marc.mutz at kdab.com
Fri Dec 4 10:30:36 CET 2015


On Friday 04 December 2015 00:05:19 Benjamin TERRIER wrote:
> In my opinion it also breaks encapsulation as the naming in a widget
> can alter the signal/slot connections in another widget.

This is precisely the reason why connectSlotsByName is a bad idea in the first 
place; changing the name of a widget breaks connections (at runtime, not at 
compile time as with QObject::connect()).

Just don't use it. Then we can let the function r.i.p. come Qt 6... :)

Thanks,
Marc

-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt Experts



More information about the Development mailing list