D11820: Handle properties with multiple values

Alexander Stippich noreply at phabricator.kde.org
Sun Apr 15 16:35:11 UTC 2018


astippich added a comment.


  Seems to work just fine, see screenshot:
  F5808864: Screenshot_20180415_181027.png <https://phabricator.kde.org/F5808864>
  
  I did a little bit more testing, and in case you didn't already know: It looks like baloo outputs properties with multiple values as a QVariantList (QList<QVariant>), and hence baloo-widgets with its test for QVariant::List should work just fine. I tested this with #elisa <https://phabricator.kde.org/tag/elisa/> and the values we get from baloo. But baloo doesn't work with lists as input. Luckily, QVariant::toStringList() works both with QStringList and QVariantList. I will work on a solution that accepts stringlists as an input for baloo. That should allow to solve the issues with all the property types in KFileMetaData. As it looks right now, there is a difference if one queries the properties via baloo (QVariantList) or directly via KFileMetaData (multiple entries with a single string).
  
  In D11820#246628 <https://phabricator.kde.org/D11820#246628>, @michaelh wrote:
  
  > > If there are still changes required in baloo-widgets, I think they should happen inside the toString() function.
  >
  > That could be done in `toString()`. The concatenation is only an intermediate step. The real plan is to use `TagWidget` for e.g. keywords, genres and so on, in that case I would have to move all the decision making back to where it is now.
  
  
  If it's only intermediary, then it's probably fine. Maybe add a comment.

REPOSITORY
  R824 Baloo Widgets

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

To: michaelh, #baloo, #frameworks
Cc: bruns, astippich, mgallien, elvisangelaccio, ashaposhnikov, spoorun, alexeymin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180415/957adbed/attachment.html>


More information about the Kde-frameworks-devel mailing list