[Kde-bindings] Problem in QtRuby invoking slots with arg types that are typedefs

Arno Rehn arno at arnorehn.de
Mon Feb 22 17:05:08 UTC 2010


On Sunday 21 February 2010 22:32:39 Richard Dale wrote:
> I was trying to get a plasma ruby applet example working with a
> 'dataUpdated(QString, Plasma::DataEngine::Data)' slot. However, it doesn't
> work because smokegen resolves the typedef for DataEngine::Data to const
> QHash<QString,QVariant>&. So the the data arg is marshalled it's type isn't
> found in the Smoke lib and I get an error:
> 
> /home/rdale/kde/src/4/kdeexamples/plasma/ruby/applets/blinker/contents/code
> /main.rb:19:in `qt_metacall': Cannot handle 'Plasma::DataEngine::Data' as
> slot argument (ArgumentError)
> 
> I think Qyoto works the same way and it will probably have the same
> problem. I haven't worked out the best way of fixing this - it is quite
> hard because the Smoke lib doesn't have any trace of DataEngine::Data to
> know what it is.
Hm, I can think of two possibilities here: Either simply add a 
DataEngine::Data marshaller to the plasma bindings or add another table or 
field to smoke which links typedefs in signal/slot signatures to their real 
type. The latter is probably better in terms of maintainability, but it could 
require another BIC change, depending on how we do the 'link'.

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list