mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 19:59:46 +00:00
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 25e6b5da39
)
This commit is contained in:
parent
3a1eff90b9
commit
a9dd6ea6bc
@ -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();
|
||||
|
@ -176,6 +176,9 @@ What's new
|
||||
|
||||
* INTERNALS
|
||||
|
||||
- Squash annoying warning from Qt when attempting to delete a non-existent
|
||||
file.
|
||||
|
||||
|
||||
* DOCUMENTATION AND LOCALIZATION
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user