D10694: epubextractor: Handle multiple subjects better

Michael Heidelbach noreply at phabricator.kde.org
Tue Mar 13 09:32:40 UTC 2018


michaelh added a comment.


  Ahhhh.... Either I'm completely off-track here or `kfilemetadata` is not doing this correctly. 
  I see a lot of statements like `artist += ', ' + value` -> no list!
  `result->add` calls `QMap->addMulti().` This forces the client to iterate over the map, which is not necessary.
  In contrary
  
    kfilemetadata/src/propertyinfo.cpp: 52
         case Property::AlbumArtist:
                d->name = QStringLiteral("albumArtist");
                d->displayName = i18nc("@label", "Album Artist");
                d->valueType = QVariant::StringList;
                break;
  
  The client can call `toVariantMap()` on the extraction result to get a `QVariantMap` but not a `QVariant::StringList`.
  I really, really, really do not understand why `kfilemetadata` is not delivering a string list. It is much more natural and consistent with the announced Property info.
  Also:
  
    kfilemetadata/src/properties.h: 282
    typedef QMap<Property::Property, QVariant> PropertyMap;
    //In taglibextractor never a list --^`
  
  I'm confused.

REPOSITORY
  R286 KFileMetaData

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

To: michaelh, mgallien, dfaure
Cc: astippich, #frameworks, ashaposhnikov, michaelh, spoorun, navarromorales, isidorov, nicolasfella, firef, andrebarros, alexeymin, emmanuelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180313/e590d138/attachment.html>


More information about the Kde-frameworks-devel mailing list