Allow passing a filename and password on the command line.

Passing passwords on the command line is not exactly best practice but will
greatly improve development productivity.
This commit is contained in:
Felix Geyer 2012-04-24 11:47:16 +02:00
parent 3aac16f03e
commit 974d4f5807
7 changed files with 54 additions and 11 deletions

View file

@ -68,6 +68,18 @@ Database* DatabaseOpenDialog::database()
return m_db;
}
void DatabaseOpenDialog::enterKey(const QString& pw, const QString& keyFile)
{
if (!pw.isNull()) {
m_ui->editPassword->setText(pw);
}
if (!keyFile.isEmpty()) {
m_ui->checkKeyFile->setText(keyFile);
}
openDatabase();
}
void DatabaseOpenDialog::openDatabase()
{
KeePass2Reader reader;