[Development] Proposal to change connectSlotsByName behavior
Thiago Macieira
thiago.macieira at intel.com
Fri Dec 4 03:00:15 CET 2015
On Friday 04 December 2015 00:27:09 Olivier Goffart wrote:
> I don't think it will break too many applications because anyone who was
> relying on the order of instentiation for that has just its application
> working out of pure luck. (And i'm pretty sure that your proposal is always
> the intended behaviour)
Note that for widgets, the order is not pure luck. The order of children of a
QWidget implies the tabbing order. Therefore, it is usually well-defined.
I don't mind changing the order, as long as there's a consensus in the mailing
list.
If we do decide to change the order, I have a follow-up question:
do we change it only in connectSlotsByName, or do we change
QObject::findChildren to reflect the new order?
Right now, connectSlotsByName simply uses findChildren's order. If we decide to
change the order in one but not the order, I'd like to hear a compelling
reason why it's ok for them be different.
> Other possibilities may include:
> - Connect signals of both objects. (Probably not a good idea since it does
> make it even more confusing)
Agreed that this is not a good idea. Let's discard it.
> - Throw a warning if there are two objects with the same name.
This is orthogonal.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list