diff options
author | Anne Jan Brouwer <annejan@noprotocol.com> | 2015-11-17 17:35:34 +0100 |
---|---|---|
committer | Anne Jan Brouwer <annejan@noprotocol.com> | 2015-11-17 17:35:34 +0100 |
commit | a39c431b49cc0e446592cb5c7a5e1df610ddfee9 (patch) | |
tree | 64a60ee15d5f290eb6595adabb499f06180eafe9 | |
parent | 5a58b099a6a87df5660c1f34519a4d1f6fed7cab (diff) |
Remove (trailing) newline(s) from pwgen output, fixes https://github.com/IJHack/qtpass/issues/115
-rw-r--r-- | mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index 1c0c3954..3111db93 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1647,7 +1647,7 @@ QString MainWindow::generatePassword() { executeWrapper(pwgenExecutable, args); process->waitForFinished(1000); if (process->exitStatus() == QProcess::NormalExit) { - passwd = QString(process->readAllStandardOutput()); + passwd = QString(process->readAllStandardOutput()).remove(QRegExp("[\\n\\r]")); } else { qDebug() << "pwgen fail"; } |