Review Request 125357: make_fat32_compatible: Actually remove double quotes

Ian Schwarz m_105 at gmx.de
Sat Dec 19 20:09:16 GMT 2015



> On Dec. 19, 2015, 9:32 a.m., Christian Ehrlicher wrote:
> > utils/patternparser.cpp, line 373
> > <https://git.reviewboard.kde.org/r/125357/diff/1/?file=405067#file405067line373>
> >
> >     Functional I don't see a problem here, but I think a simple loop over the string and checking for the problematic characters should be much faster then looping over the string 9 times and matching a QString ...
> >     QString s = string;
> >     for (int  i = 0; i < string.size(); ++i)
> >     {
> >       const QChar c = s.at(i);
> >       switch(c.toLatin1()) {
> >          case '\':
> >          case '/':
> >             ...
> >             s[i] = '_'
> >          default:
> >             break;
> >       }
> >     }

I have edited the diff to reflect this input. However, I think it's less readable now, and slightly inefficient filename computation would probably never be problem (this only happens about 12 times per CD ripped).


- Ian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125357/#review89729
-----------------------------------------------------------


On Dec. 19, 2015, 8:09 p.m., Ian Schwarz wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125357/
> -----------------------------------------------------------
> 
> (Updated Dec. 19, 2015, 8:09 p.m.)
> 
> 
> Review request for KDE Multimedia and Marco Nelles.
> 
> 
> Repository: audex
> 
> 
> Description
> -------
> 
> The encoding process fails whenever the option to produce FAT32 compatible filenames is enabled and a song title contains one or more double quotes.
> 
> 
> Diffs
> -----
> 
>   utils/patternparser.cpp 40c3acc 
> 
> Diff: https://git.reviewboard.kde.org/r/125357/diff/
> 
> 
> Testing
> -------
> 
> Compiles and fixes the problem.
> 
> 
> Thanks,
> 
> Ian Schwarz
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20151219/9dd57a70/attachment.htm>
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


More information about the kde-multimedia mailing list