[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Having trouble with DBus mappings
From: Thiago Macieira <thiago () kde ! org>
Date: 2008-07-07 12:20:46
Message-ID: 200807070920.54498.thiago () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
Kelly Miller wrote:
>On July 6, 2008 10:48:48 pm Thiago Macieira wrote:
>> You wrote your code to QList<QMap<QString, QDBusVariant> >, which
>> would map to aa{sv} (note the extra a, indicating a list of maps).
>
>That worked, although it kind of confuses me. Wouldn't that map to
> {sv}, not a{sv}? Or does a simply mean "a collection" and the brackets
> state what type?
"a" means ARRAY, in the sense of collection. Therefore, "ay" is an array
of bytes, which we map to QByteArray; "ab" is an array of bools, which we
could map to a QBitArray or a QList<bool>.
"{xx}" doesn't mean map. It means "DICT_ENTRY", i.e., the entry of the
map. So, "a{xx}" means a collection of dictionary entries -- therefore, a
dictionary.
So, the proper way of reading "a{sv}" is "ARRAY of DICT_ENTRY of (STRING,
VARIANT)".
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
["signature.asc" (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic