mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-11 17:19:40 -04: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);
|
Q_D(QSaveFile);
|
||||||
if (!d->tempFile)
|
if (!d->tempFile)
|
||||||
return false;
|
return false;
|
||||||
Q_ASSERT(isOpen());
|
if (!isOpen()) {
|
||||||
|
qWarning("QSaveFile::commit: File (%s) is not open", qPrintable(fileName()));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
QIODevice::close(); // flush and close
|
QIODevice::close(); // flush and close
|
||||||
if (d->error != QFile::NoError) {
|
if (d->error != QFile::NoError) {
|
||||||
d->tempFile->remove();
|
d->tempFile->remove();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue