Avoid getting notifications of files just saved by us

Closing the file in the destructor seems to be done after the watch is
in place, so it can get a notification in some platforms.
This commit is contained in:
mgrojo
2020-01-06 00:55:33 +01:00
parent e4d57f741e
commit 08fd226d6f

View File

@@ -271,6 +271,8 @@ void SqlExecutionArea::saveFile(const QString& filename)
// Write to the file
if(f.write(getSql().toUtf8()) != -1)
{
// Close file now. If we let the destructor close it, we can get change notifications.
f.close();
// Set modified to false so we can get control of unsaved changes when closing.
ui->editEditor->setModified(false);