D18601: Rewrite taglib writer to use property interface

Stefan BrĂ¼ns noreply at phabricator.kde.org
Thu Jan 31 18:48:56 GMT 2019


bruns added a comment.


  I think this becomes better structured when you:
  
  1. Create one function per file type, with parameters (Taglib::Filestream, KFM::PropertyMap)
  2. From this function, call a generic `updateProperties(oldProperties, newProperties) -> mergedProperties`
  3. Call the type specific function from TaglibWriter::write(...)
  
  Especially when taking the changes for writing the rating into account, this would make the code easier to read - handling of different types just once (not once for reading and once for writing), and no upcasting/dynamic_cast of Taglib::File*.  It also saves the heap allocation of the concrete TagLib::File implementation.

REPOSITORY
  R286 KFileMetaData

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

To: astippich, bruns, mgallien, broulik, cfeck
Cc: kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190131/01f159ea/attachment.html>


More information about the Kde-frameworks-devel mailing list