mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
allow multiple databeses on command line
This commit is contained in:
parent
1f6161132e
commit
0390c67c4d
@ -52,7 +52,7 @@ int main(int argc, char** argv)
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(QCoreApplication::translate("main", "KeePassX - cross-platform password manager"));
|
||||
parser.addPositionalArgument("filename", QCoreApplication::translate("main", "filename of the password database to open (*.kdbx)"), "[filename]");
|
||||
parser.addPositionalArgument("filename", QCoreApplication::translate("main", "filename(s) of the password database(s) to open (*.kdbx)"), "[filename(s)]");
|
||||
|
||||
QCommandLineOption configOption("config",
|
||||
QCoreApplication::translate("main", "path to a custom config file"),
|
||||
@ -89,8 +89,8 @@ int main(int argc, char** argv)
|
||||
|
||||
QObject::connect(&app, SIGNAL(openFile(QString)), &mainWindow, SLOT(openDatabase(QString)));
|
||||
|
||||
if (!args.isEmpty()) {
|
||||
QString filename = args[0];
|
||||
for (int ii=0; ii < args.length(); ii++) {
|
||||
QString filename = args[ii];
|
||||
if (!filename.isEmpty() && QFile::exists(filename)) {
|
||||
mainWindow.openDatabase(filename, parser.value(passwordOption), parser.value(keyfileOption));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user