commit a9dd6ea6bc5915ea824f008330a38fb239a33e7e
Author: Enrico Forestieri <[email protected]>
Date:   Sun Jan 8 23:11:04 2017 +0100

    Avoid useless warning from Qt
    
    When cloning InsetExternal, the tempname_ member of InsetExternalParams
    has yet to be initialized. So, trying to remove it causes the warning
    "QFile::remove: Empty or null file name".
    
    (cherry picked from commit 25e6b5da39b2f9d5e1ce7c66baaf0ce968c8dc1a)
---
 src/insets/InsetExternal.cpp |    3 ++-
 status.22x                   |    3 +++
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp
index d524cfc..4122cfd 100644
--- a/src/insets/InsetExternal.cpp
+++ b/src/insets/InsetExternal.cpp
@@ -98,7 +98,8 @@ TempName::~TempName()
 TempName & TempName::operator=(TempName const & other)
 {
        if (this != &other) {
-               tempname_.removeFile();
+               if (!tempname_.empty())
+                       tempname_.removeFile();
                support::TempFile f("lyxextXXXXXX.tmp");
                f.setAutoRemove(false);
                tempname_ = f.name(); 
diff --git a/status.22x b/status.22x
index 2619682..ea3d644 100644
--- a/status.22x
+++ b/status.22x
@@ -176,6 +176,9 @@ What's new
 
 * INTERNALS
 
+- Squash annoying warning from Qt when attempting to delete a non-existent
+  file.
+
 
 * DOCUMENTATION AND LOCALIZATION
 

Reply via email to