Review Request: collectionscanner: prevent writing malformed XML

Edward Hades Toroshchin edward.hades at gmail.com
Fri Oct 19 02:01:12 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106944/
-----------------------------------------------------------

Review request for Amarok.


Description
-------

Note, that this is by far not a permanent solution! This merely changes the
collectionscanner behavior to "pass incorrect data to amarok" from the less
acceptable behavior "just error out and do nothing". This may result in some
unplayable tracks, but on the other hand, the collection scan will complete
successfully (more or less).

To fix this completely, we should either move to other serialization medium
(JSON?) or to another XML writer/reader. Thoughts, suggestions welcome.


collectionscanner: prevent writing malformed XML

As you probably know already, Qt deviates from the "output strictly,
input relaxed" practice by producing shit in QXmlStreamWriter, which is
then being rejected by QXmlStreamReader.

This is a temporary solution, to try to escape all possible occurences
of invalid characters in the XML.


This addresses bug 305527.
    https://bugs.kde.org/show_bug.cgi?id=305527


Diffs
-----

  shared/collectionscanner/Directory.cpp 46274ebc7fcbda9aa0123fd048ab3742f28dca64 
  shared/collectionscanner/Playlist.cpp f131824b3461db21f7359479710b2c3164eb6149 
  shared/collectionscanner/Track.h e691bb60da4f1a40dc98493630141d7ddb066383 
  shared/collectionscanner/Track.cpp c08dbdaafe6ed85263d22701b58641a1eb76721d 
  shared/collectionscanner/utils.h PRE-CREATION 

Diff: http://git.reviewboard.kde.org/r/106944/diff/


Testing
-------

Scanned own collection. Looks fine.

Scanned some folders with creepy characters. Looks also fine.


Thanks,

Edward Hades Toroshchin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20121019/5782b12e/attachment.html>


More information about the Amarok-devel mailing list