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

Arno Rehn arno at arnorehn.de
Fri Sep 3 00:17:18 UTC 2010


On Friday 03 September 2010 02:10:06 Chris Burel wrote:
> 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.
It appears that Michael is creating his own smoke lib though, and in that case 
he is right (just confirmed it on my machine). It doesn't include external, 
non-first-grade parents, which is clearly a bug. Thanks for the report 
Michael, will try to fix it over the weekend.
The bug has just never appeared before, because the now missing classes where 
always used in some other fashion and therefore found by the internal 
algorithms.
 
> 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?


-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list