[Qt-interest] qobject_cast<> questions

Ross Bencina rossb-lists at audiomulch.com
Sun May 31 10:50:01 CEST 2009


Hi Thiago

>Please bear in mind that we cannot and will not document every single
>aspect of the behaviour of Qt. There are things that will always be left
>unexplained and undocumented, as a way of leaving the engineers some
>manoeuvring room when expanding the API.

I appreciate that.. but I would think a mechanism as fundamental as 
qobject_cast<> should be specified with the same rigor as dynamic_cast<> in 
C++. Even if just to add a line to the docs "if you pass 0 the behavior is 
undefined, don't do it!" -- at least then I would know to not call it with a 
0 parameter (even though I can do that with dynamic_cast). These kind of 
edge cases are where the bugs often happen as you know.

Thanks!

Ross. 




More information about the Qt-interest-old mailing list