> On April 25, 2015, 7:42 p.m., David Faure wrote: > > src/core/global.cpp, line 397 > > <https://git.reviewboard.kde.org/r/123224/diff/2/?file=359785#file359785line397> > > > > Why do you assemble a list, and then only look at the last element? You > > just need an int and a QMimeType, if only the last element matters. > > > > Also, why loop over every character? Is the goal to handle .foo.txt vs > > .tar.gz? There's API for that in QMimeDatabase, it can return the mimetype > > and even the known suffix without any iteration needed, see > > QMimeDatabase::suffixForFileName.
Ah sorry, I didn't know that QMimeDatabase::suffixForFileName can handle .foo.txt vs .tar.gz :) - Ashish ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/123224/#review79509 ----------------------------------------------------------- On April 26, 2015, 12:19 p.m., Ashish Bansal wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/123224/ > ----------------------------------------------------------- > > (Updated April 26, 2015, 12:19 p.m.) > > > Review request for KDE Frameworks, Plasma and Aleix Pol Gonzalez. > > > Repository: kio > > > Description > ------- > > For filenames like filename-1.6.tar.gz, KIO::suggestName suggests wrong > name(something like filename-1 2.6.tar.gz). > Expected name: filename-1.6 (1).tar.gz > > > Diffs > ----- > > autotests/globaltest.cpp ff8725d > src/core/global.cpp f18ac10 > > Diff: https://git.reviewboard.kde.org/r/123224/diff/ > > > Testing > ------- > > Works fine! > > > Thanks, > > Ashish Bansal > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel