mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-14 18:49:23 -04:00
Add assert to make sure the temp file could be opened successfully.
This commit is contained in:
parent
40f194fe4b
commit
d826ae5daf
2 changed files with 4 additions and 1 deletions
|
@ -108,6 +108,8 @@ void Config::createTempFileInstance()
|
|||
{
|
||||
Q_ASSERT(!m_instance);
|
||||
QTemporaryFile* tmpFile = new QTemporaryFile(qApp);
|
||||
tmpFile->open();
|
||||
bool openResult = tmpFile->open();
|
||||
Q_ASSERT(openResult);
|
||||
Q_UNUSED(openResult);
|
||||
m_instance = new Config(tmpFile->fileName(), tmpFile);
|
||||
}
|
||||
|
|
|
@ -176,6 +176,7 @@ void KeePass2XmlWriter::writeBinaries()
|
|||
|
||||
qint64 bytesWritten = compressor.write(i.key());
|
||||
Q_ASSERT(bytesWritten == i.key().size());
|
||||
Q_UNUSED(bytesWritten);
|
||||
compressor.close();
|
||||
|
||||
buffer.seek(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue