[Kde-bindings] Marshalling bug (Perl and Ruby bindings)

Germain Garand germain at ebooksfrance.org
Wed Aug 20 10:21:42 UTC 2003


Hi,
while investigating on some strange behaviour that showed up with Qt-3.2 but 
only with the bindings (both PerlQt and QtRuby), I realized the marshaller 
was passing const refs of objects straight to the Perl variables.
One was then very likely to mess Qt's internals by modifying those directly.

e.g: in the progress example (AnimatedThingy class)
  $pn= $p->pen; # $pn is the original const object!
  $pn->setWidth(2); # hosing QShared
  $p->setPen($pn); # won't work. Hence the missing colors/width in
                             # the "wasting cpu with this animation" dialog

I corrected PerlQt's handlers.cpp to construct  a copy for those (and fixed 
some wrong logic in construct_copy as well). QtRuby would probably
need a similar fix.

Germain


More information about the Kde-bindings mailing list