[Kde-bindings] smoke: external super classes not included in case of multiple inheritance

Chris Burel chrisburel at gmail.com
Fri Sep 3 00:10:06 UTC 2010


Smoke does know about multiple inheritance.  Check out the big
classes[] array in smokedata.cpp.  For mine, the QWidget entry looks
like this:
{ "QWidget", false, 200, xcall_QWidget, xenum_QWidget,
Smoke::cf_constructor|Smoke::cf_virtual, sizeof(QWidget) },	//451

The 3rd field, 200, is the index into the inheritanceList[] array,
which looks like this:
    240, 242, 0,	// 200: QObject, QPaintDevice

240 and 242 are indexes back to classes[] :
    { "QObject", true, 0, 0, 0, 0, 0 },	//240
    { "QPaintDevice", false, 0, xcall_QPaintDevice,
xenum_QPaintDevice, Smoke::cf_constructor|Smoke::cf_virtual,
sizeof(QPaintDevice) },	//242

So the smoke lib has that info.

2010/9/2 Michael Lawrence <lawrence.michael at gene.com>:
> Hi,
>
> Would have submitted a bug, but bugs.kde.org was having some issues. Anyway,
> it seems to me that libraries generated by smoke (i.e., the smokedata.cpp)
> does not always list all of the external classes that are the super classes
> of classes defined by the input library. This is true at least in the case
> of multiple inheritance. For example, my library has a class that extends
> QGraphicsWidget (which is included), but QGraphicsLayoutItem is not. This
> means an invalid cast occurs from my widget to QGraphicsLayoutItem. Same
> thing for any QWidget: QPaintDevice is not mentioned.
>
> Am I missing something or is Smoke?
>
> Thanks,
> Michael
>
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings
>
>



More information about the Kde-bindings mailing list