commit ee145f2a7474f329b2a856744de22a01fcb60283 Author: Georg Baum <b...@lyx.org> Date: Mon Jul 7 21:56:36 2014 +0200
Backport temp file changes from bf782ee This is a tiny part of the commit which is needed for other thread-safety fixes. diff --git a/src/support/TempFile.cpp b/src/support/TempFile.cpp index 5c4b389..21559e1 100644 --- a/src/support/TempFile.cpp +++ b/src/support/TempFile.cpp @@ -74,5 +74,10 @@ FileName TempFile::name() const } +void TempFile::setAutoRemove(bool autoremove) +{ + d->f.setAutoRemove(autoremove); +} + } // namespace support } // namespace lyx diff --git a/src/support/TempFile.h b/src/support/TempFile.h index 2adbb9f..42c1103 100644 --- a/src/support/TempFile.h +++ b/src/support/TempFile.h @@ -46,6 +46,13 @@ public: * This is empty if the file could not be created. */ FileName name() const; + /** + * Set whether the file should be automatically deleted in the + * destructor. + * Automatic deletion is the default, but it can be switched off if + * the file should be kept, because it should be renamed afterwards. + */ + void setAutoRemove(bool autoremove); private: /// struct Private;