operator>> pour une QMap avec qt dbus
Bonjour,
Dans la doc de QDbusArgument, il est écrit
"If the type you want to demarshall is a QMap or QHash, you need not declare an operator>> function for it, since QtDBus provides generic templates to do the job of demarshalling the data."
Or j'ai un type QMap<QString, QString>, que j'ai mis dans un typedef MapStringString, puis Q_DECLARE_METATYPE(MapStringString) et qDBusRegisterMetaType<MapStringString>();
Code:
1 2 3 4 5
| <method name="getAccountDetails">
<arg type="s" name="accountID" direction="in"/>
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
<arg type="a{ss}" name="details" direction="out"/>
</method> |
dans le xml.
pourtant, quand je fais
Code:
1 2 3
| QDBusReply<MapStringString> r1 = server->getAccountDetails("233327782");
MapStringString m1;
r1 >> m1; |
le make me renvoie
Code:
1 2
| ConfigDialog.cpp:19: erreur: no match for operator>> in r1 >> m1
/usr/include/qt4/QtCore/qchar.h:386: note: candidats sont: ..... |
Est-ce que l'opérateur est vraiment défini ou il faut faire autre chose pour le déclarer??
Merci