Skip to content

Commit

Permalink
Add proper error handling when QSaveFile::open() fails.
Browse files Browse the repository at this point in the history
Based on pull request by Valeriy <jazzvoid@gmail.com>

Closes keepassxreboot#450
  • Loading branch information
debfx committed Jul 31, 2016
1 parent 57ec558 commit fb57ed2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/DatabaseTabWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ bool DatabaseTabWidget::saveDatabase(Database* db)
return false;
}
}
else {
MessageBox::critical(this, tr("Error"), tr("Writing the database failed.") + "\n\n"
+ saveFile.errorString());
return false;
}

dbStruct.modified = false;
updateTabName(db);
Expand Down

0 comments on commit fb57ed2

Please sign in to comment.