D18915: Fix batchrename changing extension to lower case

cfoster noreply at phabricator.kde.org
Wed Feb 20 22:51:53 GMT 2019


cfoster added a comment.


  In D18915#416400 <https://phabricator.kde.org/D18915#416400>, @bruns wrote:
  
  > https://doc.qt.io/qt-5/qmimedatabase.html#suffixForFileName
  >
  > > Returns the suffix for the file fileName, as known by the MIME database.
  > >  This allows to pre-select "tar.bz2" for foo.tar.bz2, but still only "txt" for my.file.with.dots.txt.
  
  
  This was the original method of getting the file extension however it was converting the file extensions to lower case.
  
  This can be demonstrated with the following code:
  QMimeDatabase db;
  QUrl url = (QString) "foo.TXT";
  const QString extension = db.suffixForFileName(url.toDisplayString());
  qDebug(qUtf8Printable(extension)); //outputs "txt"

REPOSITORY
  R241 KIO

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

To: cfoster, #dolphin, #frameworks, abalaji
Cc: bruns, ngraham, elvisangelaccio, chinmoyr, kde-frameworks-devel, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190220/46bc3226/attachment.htm>


More information about the kfm-devel mailing list