[Kde-bindings] SMOKEv4 proposals

Richard Dale richard.dale at telefonica.net
Mon Sep 10 11:39:14 UTC 2012


On 09/09/2012 09:32 PM, Arno Rehn wrote:
> On 09/09/12 05:55, Richard Dale wrote:
>> On 09/08/2012 11:25 PM, Arno Rehn wrote:
>>> (5) Add more meta information to smoke. We've already discussed adding
>>>      method argument names, which sounds like a good idea and shouldn't
>>>      weigh too much with proper string interning.
>>>      We should also consider having only one 'string table' in the smoke
>>>      lib, which could save some more bytes (e.g. many classnames will be
>>>      identical to the constructor names, some argument names are probably
>>>      identical to some method names, etc..).
>>>      It would be greate if we can come up with something that lets us
>>>      add more meta-information later without breaking BC again. Adding
>>>      traditional virtual methods to the 'Smoke' class might not be such
>>>      good idea because it would break C compatibility, but maybe some
>>>      'manual' offset table with pointers to structs/funcs could be used.
>>>
>>> Can you think of anything else?
>> It would be nice to have meta data about object ownership, so that the
>> bindings would know after you call QObject::setParent() the parent
>> QObject will delete the child and so on. Phil Thompson suggested that we
>> could use the meta data from PyQt for this as I don't think it can be
>> generated automatically and it would save a lot of work. I think other
>> existing bindings already have this data in various forms too. But maybe
>> we could convert it to some kind of XML format that looks similar to the
>> current smokegen metadata.
> Ah yes. I believe something like this for the QGraphics* stuff would
> also be good. Do you know where to look for the data? Looks like it
> isn't in the release tarballs of PyQt.
It would be in the .sip files I think, which wouldn't part of a 
non-developer release, rather than somewhere separate. The QtJambi and 
other Qt projects (including PySide?) have it as xml I think.

More general points:

I think it would be best to do a reference Qt5 Smoke binding at the same 
time as improving smokegen, otherwise it is hard to know if some feature 
works in practice. That could be your 'qt crack' or QtRuby 3.0 if I can 
manage to restart perhaps.

I've done quite a lot more with QMetaType programming in QtRuby 3.0 for 
marshalling lists and so on. I'm not sure if that could be made language 
specific, although it is derived from code in the JSmoke QScript 
bindings. That is an example of something that I think it is too much of 
a big step to think of 'abstract features' that you want to put into the 
next version of Smoke without doing something language specific first 
and only then trying to generalize.

I saw the crack code has 'moc types' in it, and that definately should 
go for future bindings.

-- Richard


More information about the Kde-bindings mailing list