forked from qt-creator/qt-creator
Utils: Don't proceed with temp file which could not be opened
Change-Id: I0e12d63ecaa52e9396216c4f59e12a9ba15d9774 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -61,7 +61,8 @@ bool SaveFile::open(OpenMode flags)
|
||||
|
||||
m_tempFile = std::make_unique<QTemporaryFile>(m_finalFileName);
|
||||
m_tempFile->setAutoRemove(false);
|
||||
m_tempFile->open();
|
||||
if (!m_tempFile->open())
|
||||
return false;
|
||||
setFileName(m_tempFile->fileName());
|
||||
|
||||
if (!QFile::open(flags))
|
||||
|
||||
Reference in New Issue
Block a user