[Qt-interest] [QtDBUS] Getting properties
Georg Grabler
georg at grabler.net
Fri Apr 29 11:42:40 CEST 2011
Okay, we finally had our release yesterday, so I have time to play with
QtDBus again.
Now well, since we actually have the option to marshall / demarshall things
in QtDBus for custom types, I gave it a shot.
First, I wrote something to demarshall the filesystems, since I expected
that the Array can be demarshalled to a QList. After that did not work out
the way I expected it, I decided to marshall / demarshall the Array as well,
defining a typedef QList<CustomType>.
This did not work out as well, it seems as if the QDBusArgument operators
are never called, so I expect that I have a mistake somewhere there. I did
read the QtDBusArgument documentation as well as the KDE Techbase
documentation, but did not find a solution for this, even at the top-quality
of the documentation and examples in this area.
Anyone who can provide help? I attached my test program where i try to get
this working.
Best regards,
Georg
On Tue, Apr 12, 2011 at 5:59 PM, Thiago Macieira <thiago at kde.org> wrote:
> Em terça-feira, 12 de abril de 2011, às 17:29:22, Thiago Macieira escreveu:
> > Please find attached the one-file that I really wanted to receive.
> There's
> > no need for a header nor even for the .pro file. It's clear that I need
> QT
> > += testlib dbus
>
> And if you run your code with a recent Qt 4.7:
>
> QWARN : tst_UDisksProperties::complexProperties() QDBusAbstractInterface:
> type QDBusRawType<0x6128737362626275626262626262626229>* must be registered
> with QtDBus before it can be used to read property
> org.freedesktop.UDisks.KnownFilesystems
> QDEBUG : tst_UDisksProperties::complexProperties() QVariant(, )
> QDEBUG : tst_UDisksProperties::complexProperties()
> QDBusError("org.freedesktop.DBus.Error.Failed", "Unregistered type
> QDBusRawType<0x6128737362626275626262626262626229>* cannot be handled")
>
> The problem is that you cannot register this type (it has an ugly and
> impossible name). Please file a feature request in
> http://bugreports.qt.nokia.com to have QtDBus handle more gracefully
> complex
> properties.
>
> It should return simply a QDBusArgument you can use to demarshall here.
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Senior Product Manager - Nokia, Qt Development Frameworks
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110429/50b07f35/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 4760 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110429/50b07f35/attachment.bin
More information about the Qt-interest-old
mailing list