[Kde-bindings] Ruby: various DBus int variants

Arno Rehn arno at arnorehn.de
Sun Aug 29 13:48:04 UTC 2010


On Sunday 29 August 2010 09:07:33 Yaohan Chen wrote:
> I am having trouble passing a number as "qlonglong" to a DBus method.
> The method is KDE cookie jar's addCookies, and qdbus prints its
> signature as
> 
>   method void org.kde.KCookieServer.addCookies(QString url, QByteArray
> cookieHeader, qlonglong windowId)
> 
> If I just pass the windowId directly, I get "No such method
> 'addCookies' in interface 'org.kde.KCookieServer' at object path
> '/modules/kcookiejar' (signature 'sayi')"
> 
> If I use Qt::Variant.from_value(WINDOW_ID, 'long long int') or 'long
> long', 'qlonglong', I get:
> 
>   QDBusMarshaller: type `UserType' (127) is not registered with D-BUS. Use
>   qDBusRegisterMetaType to register it
>   QDBusConnection: error: could not send message to service "org.kde.kded"
> path "/modules/kcookiejar" interface "org.kde.KCookieServer" member
> "addCookies": Marshalling failed: Unregistered type UserType passed in
> arguments
> 
> The full code is at
> http://github.com/hagabaka/absorb/blob/master/data/absorb/cookie.rb .
> The "findDOMCookies" method works and it uses QString and QByteArray,
> so I think the problem is with qlonglong.
> 
> I also get a crash with Qt::Variant.from_value(number, 'unsigned int')
> and I think any other unsigned type.
> 
> I'm using Kubuntu with libqt4-ruby1.8 4:4.5.0b-0ubuntu2~lucid1.
Could you provide a test case which exhibits this behaviour? That would make 
fixing the bug much easier.

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list