mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-01-06 11:05:48 -05:00
fix cli commands, translations and codestyle
This commit is contained in:
parent
6723f4215a
commit
1bfbb9242c
30 changed files with 70 additions and 67 deletions
|
|
@ -27,15 +27,15 @@
|
|||
|
||||
Diceware::Diceware()
|
||||
{
|
||||
this->name = QString("diceware");
|
||||
this->description = QObject::tr("Generate a new random password.");
|
||||
name = QString("diceware");
|
||||
description = QObject::tr("Generate a new random diceware passphrase.");
|
||||
}
|
||||
|
||||
Diceware::~Diceware()
|
||||
{
|
||||
}
|
||||
|
||||
int Diceware::execute(QStringList arguments)
|
||||
int Diceware::execute(const QStringList& arguments)
|
||||
{
|
||||
QTextStream inputTextStream(stdin, QIODevice::ReadOnly);
|
||||
QTextStream outputTextStream(stdout, QIODevice::WriteOnly);
|
||||
|
|
@ -48,13 +48,13 @@ int Diceware::execute(QStringList arguments)
|
|||
parser.addOption(words);
|
||||
QCommandLineOption wordlistFile(QStringList() << "w"
|
||||
<< "word-list",
|
||||
QObject::tr("Wordlist fot the diceware generator.\n[Default: EFF English]"),
|
||||
QObject::tr("Wordlist for the diceware generator.\n[Default: EFF English]"),
|
||||
QObject::tr("path"));
|
||||
parser.addOption(wordlistFile);
|
||||
parser.process(arguments);
|
||||
|
||||
const QStringList args = parser.positionalArguments();
|
||||
if (args.size() != 0) {
|
||||
if (!args.isEmpty()) {
|
||||
outputTextStream << parser.helpText().replace("keepassxc-cli", "keepassxc-cli diceware");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue