mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-03-11 08:54:48 +00:00
Make calling QSaveFile::commit() non-fatal if it's not open.
This commit is contained in:
parent
f22069bb11
commit
577609b3e3
1 changed files with 4 additions and 1 deletions
|
|
@ -279,7 +279,10 @@ bool QSaveFile::commit()
|
|||
Q_D(QSaveFile);
|
||||
if (!d->tempFile)
|
||||
return false;
|
||||
Q_ASSERT(isOpen());
|
||||
if (!isOpen()) {
|
||||
qWarning("QSaveFile::commit: File (%s) is not open", qPrintable(fileName()));
|
||||
return false;
|
||||
}
|
||||
QIODevice::close(); // flush and close
|
||||
if (d->error != QFile::NoError) {
|
||||
d->tempFile->remove();
|
||||
|
|
|
|||
Loading…
Reference in a new issue