[Kde-bindings] qtruby: invokable methods and inherited properties

Sven Moritz Hallberg hallberg at pre-sense.de
Fri Jun 24 15:48:07 UTC 2011


hi again,

some more patching has accumulated in my qtruby branch, see attached:

1) invokable methods. added a class method 'invokable' to declare Ruby methods
as such (cf. Q_INVOKABLE). it turned out i didn't need this functionality
after all, at least for now. IIRC there is still something going wrong with
marshalling the return values. nevertheless i thought i'd share the work
already done.

2) properties in class hierarchies on the ruby side. have class B inherit
class A. properties declared in A are accessible on instances of B. i'm
entirely not sure i did this the right way but it appears to work. ;) there is
only one implementation for qt_metacall and that would look up the metaobject
only for B in the above example, thus looking past properties from A. i made
the helper qt_readprop walk the superclass chain until it finds the property
it's looking for. likewise for qt_writeprop.

regards!
-- 
Sven Moritz Hallberg                      hallberg at pre-sense.de
                                  Tel. +49 - 40 - 244 2407 - 28
                                  Fax  +49 - 40 - 244 2407 - 24
PRESENSE Technologies GmbH            Sachsenstr. 5, D-20097 HH
                                         USt-IdNr.: DE263765024
Geschäftsführer/Managing Directors       AG Hamburg, HRB 107844
Till Dörges           Jürgen Sander              Axel Theilmann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qtruby-properties-2011-06-24-invokables-superprops.patch
Type: text/x-patch
Size: 7956 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20110624/57fde780/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20110624/57fde780/attachment.sig>


More information about the Kde-bindings mailing list