On sábado, 7 de julho de 2012 09.22.50, Lucas Betschart wrote:
> Thats my code:
>
> bool QUbuntuOne::getThrottlingLimits(){
>     QDBusMessage ret > 
> QDBusCon->call(QDBusMessage::createMethodCall(DESTINATION,"/config","","get_
> throttling_limits")); if(ret.type() == QDBusMessage::ErrorMessage){
>         qDebug() << "DBus Error:\n" << QDBusCon->lastError().name() <<
> "\n" << QDBusCon->lastError().message();
>         return (false);
>     }
>     //ret.arguments().t
>     return true;
> }
>
> How can I convert what the QDBusMessage arguments I got in ret to a QMap?

The first variant in the arguments contains something that can be converted to
your map. Use:

    qdbus_cast<QMap<Key, Value> >(ret.arguments().first());

> I also don't understand for what the "Interface" parameter in
> createMethodCall is. It seems to work well with out this till now (I
> have only implemented DBus methodes till now, no signals).

The D-Bus specification says that you can make calls to the empty interface and
this needs to work, calling any method with that name in any interface. If you
have a specific interface in mind, use it.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to