On quarta-feira, 2 de outubro de 2013 07:13:11, Knoll Lars wrote: > +1. It's our decision not to use exceptions in Qt code, but I see quite a > bit of value in being able to throw exceptions from a slot if that's the > pattern a developer chooses to use. We've been doing quite a bit of work > to allow this in Qt 4, and it's the main place where exception safety in > Qt Core really makes sense IMO.
Then please clarify the semantics. I really don't see this as a currently- valid use-case because it's not been specified. I dislike allowing this via the signal-slot mechanism because I see throwing from a slot as incompatible with the connection semantics. That would mean any signal could throw ANY exception. It would also preempt the execution of further slots, which might be important. Usually the person who connects a signal to a slot is a completely different developer than who wrote the signal or the slot. That would mean people who do connections should have to pay attention to what slots throw and know what signals can cope with exceptions being thrown. I would accept at most exceptions through the invokeMethod mechanism in a DirectConnection, since that's a 1:1 relationship and there are no signals. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development