mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Outputing newline after password prompt. (#659)
This commit is contained in:
parent
95baf25648
commit
fdbed324f7
@ -63,10 +63,15 @@ void PasswordInput::setStdinEcho(bool enable = true)
|
||||
QString PasswordInput::getPassword()
|
||||
{
|
||||
static QTextStream inputTextStream(stdin, QIODevice::ReadOnly);
|
||||
static QTextStream outputTextStream(stdout, QIODevice::WriteOnly);
|
||||
|
||||
setStdinEcho(false);
|
||||
QString line = inputTextStream.readLine();
|
||||
setStdinEcho(true);
|
||||
|
||||
// The new line was also not echoed, but we do want to echo it.
|
||||
outputTextStream << "\n";
|
||||
outputTextStream.flush();
|
||||
|
||||
return line;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user