D19087: Add standalone conversion functions for PropertyMap to Json and vice versa

Stefan BrĂ¼ns noreply at phabricator.kde.org
Wed Feb 20 23:54:22 GMT 2019


bruns marked an inline comment as done.
bruns added inline comments.

INLINE COMMENTS

> astippich wrote in propertydata.cpp:80
> This means that multiple entries with the same key get stored as single entries in the property map, right? 
> This breaks the current behavior in dolphin and baloo-widgets. Merging (or more specific D19088 <https://phabricator.kde.org/D19088>) must then wait until we convert all those data to output stringlists. But I think this code will also split up data of stringlists, doesn't it?
> Also, if there are multiple extractors for the same mime type (which I know there aren not currently) , which will add e.g. two releaseYear properties, these will be converted to a string.

Actually, I am not sure **if** we need the stringlists as a separate type.. What is the difference between multiple strings in a stringlist, and multiple strings as individual dict entries?

What is the **semantic** difference between the two?

> astippich wrote in propertydata.cpp:83
> Now ints are converted to doubles, which is not fatal, but IMHO also not very clean either. But since JSON only knows doubles, this is what we get. Only way out in this case is to query PropertyInfo::valueType, and do the conversion based on this.

Thats what also happens in the current code.

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D19087

To: bruns, #baloo, #frameworks, ngraham, poboiko, astippich
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/20190220/22c3ca99/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list