mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-01 11:06:17 -04:00
Outputing newline after password prompt. (#659)
This commit is contained in:
parent
95baf25648
commit
fdbed324f7
1 changed files with 5 additions and 0 deletions
|
@ -63,10 +63,15 @@ void PasswordInput::setStdinEcho(bool enable = true)
|
||||||
QString PasswordInput::getPassword()
|
QString PasswordInput::getPassword()
|
||||||
{
|
{
|
||||||
static QTextStream inputTextStream(stdin, QIODevice::ReadOnly);
|
static QTextStream inputTextStream(stdin, QIODevice::ReadOnly);
|
||||||
|
static QTextStream outputTextStream(stdout, QIODevice::WriteOnly);
|
||||||
|
|
||||||
setStdinEcho(false);
|
setStdinEcho(false);
|
||||||
QString line = inputTextStream.readLine();
|
QString line = inputTextStream.readLine();
|
||||||
setStdinEcho(true);
|
setStdinEcho(true);
|
||||||
|
|
||||||
|
// The new line was also not echoed, but we do want to echo it.
|
||||||
|
outputTextStream << "\n";
|
||||||
|
outputTextStream.flush();
|
||||||
|
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue