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,6 +98,7 @@ TempName::~TempName()
|
|||||||
TempName & TempName::operator=(TempName const & other)
|
TempName & TempName::operator=(TempName const & other)
|
||||||
{
|
{
|
||||||
if (this != &other) {
|
if (this != &other) {
|
||||||
|
if (!tempname_.empty())
|
||||||
tempname_.removeFile();
|
tempname_.removeFile();
|
||||||
support::TempFile f("lyxextXXXXXX.tmp");
|
support::TempFile f("lyxextXXXXXX.tmp");
|
||||||
f.setAutoRemove(false);
|
f.setAutoRemove(false);
|
||||||
|
@ -176,6 +176,9 @@ What's new
|
|||||||
|
|
||||||
* INTERNALS
|
* INTERNALS
|
||||||
|
|
||||||
|
- Squash annoying warning from Qt when attempting to delete a non-existent
|
||||||
|
file.
|
||||||
|
|
||||||
|
|
||||||
* DOCUMENTATION AND LOCALIZATION
|
* DOCUMENTATION AND LOCALIZATION
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user