D8696: Don't autoremove empty temp file

Elvis Angelaccio noreply at phabricator.kde.org
Tue Nov 7 16:08:56 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).
  
  I even hit an assert with my self-compiled build:
  
    ASSERT: "unnamedFile == d_func()->fileEntry.isEmpty()"
  
  (in qtemporaryfile.cpp, line 514).
  
  The problem is that after `socketfile.remove()` we get an empty
  `fileName()` which will be a problem when the QTemporaryFile gets
  destroyed at the end of the if() block.
  To avoid this issue we disable the autoremove mode.

TEST PLAN
  No longer get the runtime warning every time a file item gets hovered in KFileWidget.

REPOSITORY
  R241 KIO

BRANCH
  fix-empty-qtemporaryfile

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

AFFECTED FILES
  src/core/connectionbackend.cpp

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


More information about the Kde-frameworks-devel mailing list