Hi, i have the following DBus Definition:
<?xml version="1.0" ?>
<node name="/filesystem">
<interface name="org.mtpd">
<method name="list">
<!-- path: the path on the device to list -->
<arg direction="in" type="s" name="path" />
<!-- array contents: name/mimetype pairs -->
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0"
value="QMap<QString,QString>"/>
<arg direction="out" type="a{ss}" name="contents" />
</method>
<method name="info">
<!-- path: the path on the device to get the info from -->
<arg direction="in" type="s" name="path" />
<arg direction="out" type="s" name="name" />
<arg direction="out" type="i" name="size" />
<arg direction="out" type="s" name="mimetype" />
<arg direction="out" type="s" name="modificationdate" />
</method>
</interface>
</node>
This is used to generate code for the dbus service as well as the clients.
When using it with dbus-c++ all works fine, but QtDBus makes problems. When I
try to compile the attached testproject (or any other project) i get the
following error:
/usr/include/QtCore/qmetatype.h:169:80: error: ‘qt_metatype_id’ is not a
member of ‘QMetaTypeId<QMap<QString, QString> >’
As can be seen in the attached project (The mtpd-interface.h is normally
generated, i included it for convenience) I do the following in the main
header file
typedef QMap<QString,QString> StringMap;
Q_DECLARE_METATYPE(StringMap)
and in the Constructor in the cpp I do a
qDBusRegisterMetaType<StringMap>();
So what am I doing wrong?
Kind Regards
Philipp Schmidt
PS: I also put the project tar.gz in my dropbox:
http://dl.dropbox.com/u/14496907/mtp-dbus-testproject.tar.gz
mtp-dbus-testproject.tar.gz
Description: application/compressed-tar
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
