D15408: Don't assert deleting the temporary file

2019-03-05 Thread Jaime Torres Amate
jtamate planned changes to this revision.
jtamate added a comment.


  The more I try to understand my own explanations, the less I agree with my 
past me.
  
  - Reading again the QTemporary documentation, without anything, the 
constructor creates a temporary file in the temp directory with prefix the 
application name.
- Why would the temporary file be deleted if the trash is being emptied?
  - Unless KIO::file_copy closes the file if the origin file to be copied 
is not available. If it is the case, a comment is needed.
  
  Also the asserts were modified by commit 
7ce34436a0387f3620e3f47ea7252d151e839776 


REPOSITORY
  R241 KIO

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

To: jtamate, dfaure, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D15408: Don't assert deleting the temporary file

2019-03-02 Thread David Faure
dfaure accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R241 KIO

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

To: jtamate, dfaure, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D15408: Don't assert deleting the temporary file

2018-09-10 Thread Jaime Torres Amate
jtamate created this revision.
jtamate added reviewers: dfaure, Frameworks.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
jtamate requested review of this revision.

REVISION SUMMARY
  Change the names of the temporary files to something more difficult for other 
KDE programs to create.
  Remove the asserts. 
  In the very unlikely situation when the preview temporary file has been 
replaced by other temporary file, nothing can be done to avoid to delete the 
file.

TEST PLAN
  With a lot of images in the trash, while dolphin create the previews, empty 
the trash. (It can take a while, around 3000 images, until it asserts).
  Before: a crash in the second assert (Is a file?), because the temporary file 
was already deleted, therefore it is not a file.

REPOSITORY
  R241 KIO

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

AFFECTED FILES
  src/widgets/previewjob.cpp

To: jtamate, dfaure, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns