On Tue, May 12, 2015 at 11:51 AM, Emil Dotchevski
On Tue, May 12, 2015 at 1:34 AM, Dominique Devienne
Also the fact that you must static_cast from a void* to get back the QPushButton is a little disturbing, when the single type itself never "said" in its signature the emitter has to be a QPushButton. Wouldn't such casting also be fraught with dangers in case of multiple or virtual inheritance? Thanks, --DD
Yes, one has to be careful with casting. I'm wondering if it's worth storing in the connection object the type of the emitter, which can be captured at the time connect is called, if available.
In your example, the emiter type is already lost, but yes, being able to do at least a "safe cast" (i.e. dynamic_cast like) in the meta "slot", or even better enforce a required emiter type in the signal itself (perhaps optionally) would go a long way to make Synapse more typesafe, and thus safer IMHO. My $0.02. Thanks again, --DD