Display an error message when opening the database fails.

Closes #462
This commit is contained in:
Felix Geyer 2016-05-20 16:49:32 +02:00 committed by Jonathan White
parent ba68e0a4a1
commit 3415073051
4 changed files with 8 additions and 6 deletions

View file

@ -49,7 +49,8 @@ void KeePass1OpenWidget::openDatabase()
QFile file(m_filename);
if (!file.open(QIODevice::ReadOnly)) {
// TODO: error message
MessageBox::warning(this, tr("Error"), tr("Unable to open the database.").append("\n")
.append(file.errorString()));
return;
}
if (m_db) {