Summary: | KWallet's readMap is not friendly to non-C++ applications | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kwallet | Reporter: | Darin McBride <Tanktalus> |
Component: | general | Assignee: | Valentin Rusu <valir> |
Status: | REOPENED --- | ||
Severity: | wishlist | CC: | cberzan, j.mairboeck, kdelibs-bugs, zeke |
Priority: | NOR | ||
Version First Reported In: | 5.115.0 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Darin McBride
2010-11-05 16:18:58 UTC
Isn't it the responsibility of your "bindings" to convert the data? Even qdbusviewer is not able to convert the data because it is being returned as an array of bytes. Checking the introspection in qdbusviewer, I get (part of the result): <method name="readMap"> <arg direction="out" type="ay"/> Looking in dbus-protocol.h, I see "a" is for array, and "y" is for "byte". It's not returning a "QMap<QString,QString>", thus the general DBus binding cannot know how to convert the data back into normal data structures. Looking at dbus-protocol.h a bit further, I see a "dict" type - perhaps that's closer to the meaning of KWallet's map, and maybe that should be the return of readMap over DBus, instead of new APIs? (Though I don't know if the Perl bindings support dict yet.) Just to add to this, I noticed that there is a dict type used for readMapList, which, again, has an odd return type: instead of being a dict of a dict, it, again, just seems to store the QMap<QString,QString> object as a QByteArray, which means again that I would need a binding that was particular to KWallet instead of generic to DBus in order to handle this. Basically, the output in qdbusviewer also does not show the actual mapping, it merely shows the numeric representation of each byte (e.g., "{0, 0, 0, 3, 0, 0, 0, 8, ..."). Yep, it would be really nice if readMap would return a DBus dict rather than a binary array. Hi, kdelibs (version 4 and earlier) is no longer maintained since a few years. KDE Frameworks 5 or 6 might already have implemented this wish. If not, please re-open against the matching framework if feasible or against the application that shows the issue. We then can still dispatch it to the right Bugzilla product or component. Greetings Christoph Cullmann This is still the case for Frameworks 5.115.0. I don't have KF6 installed at the moment. |