Finally I was able to figure what was causing the error. Because of the
incorrect way I was passing the arguments, DBus was treating the Variant array
as a single String. This is the code that works.

    if (iface->isValid()){
        QList<QVariant> args;
        args.append("com.nokia.Account.Interface.Compat");
        args.append("SecondaryVCardFields");
        QList<QVariant> fields;
1        QStringList valuesList;
2        valuesList.append("TEL");
3        fields << QVariant::fromValue(QDBusVariant(valuesList));
        args.append(fields);
        iface->callWithArgumentList(QDBus::AutoDetect,"Set",args);
    }

Just for info, I was using fields.append("TEL") instead of lines 1,2 and 3.

Detailed info on QDbusVariant --
http://doc.qt.nokia.com/4.6/qdbusvariant.html#details

Thanks All,
Sudheer


_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to