Add Merge database utility function (#47)
Thank you to @TheZ3ro and @monomon for there major contributions to this PR!
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "autotype/AutoType.h"
|
||||
#include "core/Config.h"
|
||||
#include "core/Global.h"
|
||||
#include "core/Database.h"
|
||||
#include "core/Group.h"
|
||||
#include "core/Metadata.h"
|
||||
@@ -192,6 +193,21 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseTabWidget::mergeDatabase()
|
||||
{
|
||||
QString filter = QString("%1 (*.kdbx);;%2 (*)").arg(tr("KeePass 2 Database"), tr("All files"));
|
||||
const QString fileName = fileDialog()->getOpenFileName(this, tr("Merge database"), QString(),
|
||||
filter);
|
||||
if (!fileName.isEmpty()) {
|
||||
mergeDatabase(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseTabWidget::mergeDatabase(const QString& fileName)
|
||||
{
|
||||
currentDatabaseWidget()->switchToOpenMergeDatabase(fileName);
|
||||
}
|
||||
|
||||
void DatabaseTabWidget::importKeePass1Database()
|
||||
{
|
||||
QString fileName = fileDialog()->getOpenFileName(this, tr("Open KeePass 1 database"), QString(),
|
||||
|
||||
Reference in New Issue
Block a user