]> git.lyx.org Git - features.git/commitdiff
Backport temp file changes from bf782ee
authorGeorg Baum <baum@lyx.org>
Mon, 7 Jul 2014 19:56:36 +0000 (21:56 +0200)
committerGeorg Baum <baum@lyx.org>
Mon, 7 Jul 2014 19:56:36 +0000 (21:56 +0200)
This is a tiny part of the commit which is needed for other thread-safety
fixes.

src/support/TempFile.cpp
src/support/TempFile.h

index 5c4b389b8499c146fdf50fce3d610c132746788c..21559e144fe5418d245701dc6520468098ccdd49 100644 (file)
@@ -74,5 +74,10 @@ FileName TempFile::name() const
 }
 
 
+void TempFile::setAutoRemove(bool autoremove)
+{
+       d->f.setAutoRemove(autoremove);
+}
+
 } // namespace support
 } // namespace lyx
index 2adbb9f8de64b3f1656c1e69801a2db10fba68d0..42c1103d124560ee2e9a926f7641a7be6c131725 100644 (file)
@@ -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;