From 9dab90df773174f66c867d17baa33bdd53b68ea2 Mon Sep 17 00:00:00 2001 From: Andras Salamon Date: Sat, 24 Sep 2016 15:49:06 +0200 Subject: [PATCH] issue 101 bugfix --- mainwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 1ad200e8d..8161a7711 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #define WIN32_LEAN_AND_MEAN /*_KILLING_MACHINE*/ #define WIN32_EXTRA_LEAN @@ -1361,7 +1362,10 @@ QList MainWindow::listKeys(QString keystring, bool secret) { process->waitForFinished(2000); if (process->exitStatus() != QProcess::NormalExit) return users; - QStringList keys = QString(process->readAllStandardOutput()) + QByteArray processOutBytes = process->readAllStandardOutput(); + QTextCodec *codec = QTextCodec::codecForLocale(); + QString processOutString = codec->toUnicode(processOutBytes); + QStringList keys = QString(processOutString) .split(QRegExp("[\r\n]"), QString::SkipEmptyParts); UserInfo current_user; foreach (QString key, keys) {