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