Add proper error handling when QSaveFile::open() fails.

Based on pull request by Valeriy <jazzvoid@gmail.com>

Closes #450
This commit is contained in:
Felix Geyer 2016-07-31 17:03:25 +02:00
parent 57ec558396
commit fb57ed2bcd

View File

@ -309,6 +309,11 @@ bool DatabaseTabWidget::saveDatabase(Database* db)
return false; return false;
} }
} }
else {
MessageBox::critical(this, tr("Error"), tr("Writing the database failed.") + "\n\n"
+ saveFile.errorString());
return false;
}
dbStruct.modified = false; dbStruct.modified = false;
updateTabName(db); updateTabName(db);