[PyQt] ConvertToSubClass problem
Giovanni Bajo
rasky at develer.com
Tue Nov 18 00:12:49 GMT 2008
Hi Phil,
this patch:
2007/02/25 0:19:29 phil
Included Matt Newell's fix for making sure that a sub-class convertor
returns the most specific type available.
causes problem with PyQt3Support. Specifically, the
ConvertToSubClassCode in q3mainwindow.sip does not seem to work as
expected. The bug manifests itself when the code is invoked to find the
most derived class for a Q3ListView. The convertor correctly detects the
correct type, but this additional check (added by Matt Newell):
&& !PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)subtype)
make it so that the convertor's result is ignored.
It might well be that the bug is in the placement of the convertor
within pyqt3support. It is currently placed within Q3MainWindow, but it
contains conversion code for many different classes (unrelated to
Q3MainWindow). I'm afraid I'm not sure where one should place the
convertors code.
Any guess on what exactly is the bug?
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
More information about the PyQt
mailing list