Choose database for saving or updating entries from KeePassXC-Browser (#2391)

This commit is contained in:
Sami Vänttinen 2018-10-19 21:44:08 +03:00 committed by Jonathan White
parent bb16dc6d01
commit b8d2d5d877
13 changed files with 307 additions and 22 deletions

View file

@ -555,6 +555,7 @@ void DatabaseTabWidget::updateTabName(Database* db)
const DatabaseManagerStruct& dbStruct = m_dbList.value(db);
QString tabName;
QString fileName;
if (dbStruct.fileInfo.exists()) {
if (db->metadata()->name().isEmpty()) {
@ -563,6 +564,7 @@ void DatabaseTabWidget::updateTabName(Database* db)
tabName = db->metadata()->name();
}
fileName = dbStruct.fileInfo.fileName();
setTabToolTip(index, dbStruct.fileInfo.absoluteFilePath());
} else {
if (db->metadata()->name().isEmpty()) {
@ -580,6 +582,9 @@ void DatabaseTabWidget::updateTabName(Database* db)
tabName.append("*");
}
dbStruct.dbWidget->setDatabaseName(tabName);
dbStruct.dbWidget->setDatabaseFileName(fileName);
setTabText(index, tabName);
emit tabNameChanged();
}