mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-25 19:41:37 -08:00
CLI: Use stderr for password prompt
Fixes #3398. Convert to QTextStream for all CLI IO and greatly improve CLI tests * Completely overhaul CLI tests to be much more streamlined and easy to read. Removed unnecessary code blocks by using existing functions. Co-authored-by: Emma Brooks <[email protected]>
This commit is contained in:
1 parent
612f8d2e5b
commit
485852c9db
30 files changed
+938
-1407
No files matched your search
+2
-1
@@ -29,7 +29,7 @@ Help::Help()
|
||||
|
||||
int Help::execute(const QStringList& arguments)
|
||||
{
|
||||
TextStream out(Utils::STDERR, QIODevice::WriteOnly);
|
||||
auto& out = Utils::STDOUT;
|
||||
QSharedPointer<Command> command;
|
||||
if (arguments.size() > 1 && (command = Commands::getCommand(arguments.at(1)))) {
|
||||
out << command->getHelpText();
|
||||
@@ -39,5 +39,6 @@ int Help::execute(const QStringList& arguments)
|
||||
out << cmd->getDescriptionLine();
|
||||
}
|
||||
}
|
||||
out.flush();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in new issue
Block a user