mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-24 02:51:38 -08:00
Global const for KeyFileOption (CLI) (#2505)
This commit is contained in:
1 parent
1a2721529d
commit
49b82ea6a2
11 files changed
+34
-55
No files matched your search
+2
-6
@@ -49,11 +49,7 @@ int Add::execute(const QStringList& arguments)
|
||||
parser.setApplicationDescription(description);
|
||||
parser.addPositionalArgument("database", QObject::tr("Path of the database."));
|
||||
parser.addOption(Command::QuietOption);
|
||||
|
||||
QCommandLineOption keyFile(QStringList() << "k" << "key-file",
|
||||
QObject::tr("Key file of the database."),
|
||||
QObject::tr("path"));
|
||||
parser.addOption(keyFile);
|
||||
parser.addOption(Command::KeyFileOption);
|
||||
|
||||
QCommandLineOption username(QStringList() << "u" << "username",
|
||||
QObject::tr("Username for the entry."),
|
||||
@@ -91,7 +87,7 @@ int Add::execute(const QStringList& arguments)
|
||||
const QString& entryPath = args.at(1);
|
||||
|
||||
auto db = Database::unlockFromStdin(databasePath,
|
||||
parser.value(keyFile),
|
||||
parser.value(Command::KeyFileOption),
|
||||
parser.isSet(Command::QuietOption) ? Utils::DEVNULL : Utils::STDOUT,
|
||||
Utils::STDERR);
|
||||
if (!db) {
|
||||
|
||||
Reference in new issue
Block a user