bruns added a comment.
In D19087#440361 <https://phabricator.kde.org/D19087#440361>, @astippich wrote: > This still alters the map during deserialization. Lists are converted into multi single properties afterwards. As I said, due to backwards-compatibility lists should stay lists. 1. No extractor inserts lists, just single values. 2. Extractors are allowed and do insert different values for the same property. -> Lists do not exists as property values. Supporting lists were a new feature. Both SimpleExtractionResult::properties() (used by the temp extractor) and Baloo::File::properties() return a KFileMetadata::PropertyMap, and it seems only logical both behave likewise. SimpleExtractionResult::properties() already returns the properties one by one, now Baloo::File::properties() does the same. The current behavior of the Baloo serialization (and thus the deserialization result) is illogical - when you insert a single value, you get back a single non-list QVariant, when inserting multiple values, this is silently converted to a QVariantList. The return type depends on the number of values. The SimpleExtractionResult behavior is consistent - `PropertyMap::find()` returns the first value, `PropertyMap::values()`returns all values, independent on the number of values. Given the choice between an inconsistent and illogical behavior on one hand, and consistent and logical on the other, I definitely prefer the second one. REPOSITORY R293 Baloo REVISION DETAIL https://phabricator.kde.org/D19087 To: bruns, #baloo, #frameworks, ngraham, poboiko, astippich Cc: kde-frameworks-devel, gennad, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams