D8697: Don't check whether an empty filename exists

Elvis Angelaccio noreply at phabricator.kde.org
Tue Nov 7 16:04:58 UTC 2017


elvisangelaccio created this revision.
elvisangelaccio added a reviewer: dfaure.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  Since 5.10 (commit 0dee566e98 in qtbase) Qt complains if we make a
  system call with an empty filename (with a "Empty filename passed to
  function" runtime warning).
  
  There is no reason to call `exists()` if we already know that a filename
  is empty. While at it, port to `QFileInfo::exists()` which is faster.

TEST PLAN
  Together with https://phabricator.kde.org/D8696, fixes all the runtime warnings when running `tests/kfilewidgettest_gui`.

REPOSITORY
  R241 KIO

BRANCH
  fix-empty-exists

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

AFFECTED FILES
  src/core/knfsshare.cpp
  src/core/ksambashare.cpp

To: elvisangelaccio, dfaure
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171107/b71cab76/attachment.html>


More information about the Kde-frameworks-devel mailing list