From a9dd6ea6bc5915ea824f008330a38fb239a33e7e Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 8 Jan 2017 23:11:04 +0100 Subject: [PATCH] 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 deletion(-) diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp index d524cfca99..4122cfdb05 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 261968292e..ea3d644c7b 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 -- 2.39.5