[Interest] QDBus Dict

Lucas Betschart lucasbetschart at gmail.com
Sat Jul 7 09:22:50 CEST 2012

Good Morning,

I'm using QDbus to talk with the Ubuntu One SyncDaemon.
How can I convert a DBus Dict into a QMap?

I'm want to implement the following DBus method:

 /config method com.ubuntuone.SyncDaemon.Config.get_throttling_limits
Get the read write limit from AQ and return a dict
Returns a dict download int upload int, if int is 1 the value isn't
configured.  The values are bytes second

Thats my code:

bool QUbuntuOne::getThrottlingLimits(){
    QDBusMessage ret =
    if(ret.type() == QDBusMessage::ErrorMessage){
        qDebug() << "DBus Error:\n" << QDBusCon->lastError().name() <<
"\n" << QDBusCon->lastError().message();
        return (false);
    return true;

How can I convert what the QDBusMessage arguments I got in ret to a QMap?

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).



More information about the Interest mailing list