Set a default filename when saving a new database.

Closes #308
This commit is contained in:
Felix Geyer 2015-07-25 17:47:45 +02:00
parent 5bd525a6dd
commit a862f62fe8

View File

@ -326,6 +326,9 @@ bool DatabaseTabWidget::saveDatabaseAs(Database* db)
if (dbStruct.saveToFilename) {
oldFileName = dbStruct.filePath;
}
else {
oldFileName = tr("New database").append(".kdbx");
}
QString fileName = fileDialog()->getSaveFileName(this, tr("Save database as"),
oldFileName, tr("KeePass 2 Database").append(" (*.kdbx)"));
if (!fileName.isEmpty()) {