D17302: Add test for adding properties to result
Stefan BrĂ¼ns
noreply at phabricator.kde.org
Mon Feb 11 22:24:05 GMT 2019
bruns added a comment.
Currently, both
`Result::add(prop, "value1"); Result::add(prop, "value2");`
and
`Result::add(prop, {"value1", "value2"});`
are serialized (JSON) in the same way as `{prop: ["value1", "value2"]}` by Baloo, which is IMHO fine.
On the other hand,
`Result::add(prop, "value1"); Result::add(prop, {"value2", "value3"});`
ends up as `{prop: ["value1", ["value2", "value3"] ]}`, which is nonsense, should be `{prop: ["value1", "value2", "value3"]}`
I am currently moving the serialization (in file/result.cpp) /deserialization (in file/file.cpp) into a separate function so it becomes testable.
After deserializing, we should have `KFM::Propertymap pm.values(prop)` -> `QList<QVariant<QString>>({"value1", "value2", "value3"})`.
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D17302
To: astippich, #baloo, bruns
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190211/88ec1365/attachment.html>
More information about the Kde-frameworks-devel
mailing list