[PyKDE] convertSubClass() -- I introduced a bug :-(

Dave Cuthbert dacut at neolinear.com
Mon Apr 12 15:02:00 BST 2004


Phil Thompson wrote:
> Don't talk about *the* subclass converter for A, there can be any number of 
> them. For example, the qt, qtcanvas, qtext, qtgl, qtnetwork, qtsql and 
> qttable all provide converters for QObject.

Ah, *now* I get it.  (Did I manage to overlook the documentation on 
this, or is it one of those moving targets?)

It's not obvious from the SIP files -- for example, in qcanvas.sip, it 
looks like it's defining a subclass converter just for stuff in QCanvas 
and below.  But in the generated file, it's clearly overlaying (? is 
there a better word to describe this?) the QObject converter from 
qobject.sip.

>>This aliasing would happen, though, for any converter which relies on
>>dynamic_cast<>() (and some other kits which have their own RTTI).
> 
> The source of the type information is irrelevant. I agree that using 
> dynamic_cast<>() would potentially mean you had overlapping converters - but 
> that's just a bug in the converter.

Yep... I now understand the grand vision of how it all works.  Thanks!

Dave




More information about the PyQt mailing list