]> git.lyx.org Git - features.git/commit
Re-add method to get a temporary file name without persistent QTemporaryFile object
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 8 Feb 2018 10:31:23 +0000 (11:31 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 8 Feb 2018 10:31:23 +0000 (11:31 +0100)
commit9e2928be68992161a54287d153e1e9431e30bb4c
tree16ccf04e4b5ee27fd7bf171accbebfdfdab3884d
parent41f59527d1df71cc562008f6980e353772e2960d
Re-add method to get a temporary file name without persistent QTemporaryFile object

This is needed for cases where the temp file has to be manually removed
at some point (e.g., if temp files are used as conversion target, and
the initial file only serves as a placeholder), since QTemporaryFile
objects cannot be manually removed at least on Windows (they are always
kept open internally even after close()). See
​http://lists.qt-project.org/pipermail/interest/2013-August/008352.html

In order to avoid race conditions due to duplicate names (the issue why
the old method was removed), we record all used temp file names.

Fixes: #9139
src/Buffer.cpp
src/support/filetools.cpp
src/support/filetools.h