Use UTF-8 to decode logs on Java 18 or newer

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2024-10-09 16:59:56 +01:00
parent 909114bf2a
commit 98adcc60a3
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E
5 changed files with 15 additions and 6 deletions

View file

@ -39,7 +39,8 @@
#include <QTextDecoder>
#include "MessageLevel.h"
LoggedProcess::LoggedProcess(QObject* parent) : QProcess(parent)
LoggedProcess::LoggedProcess(const QTextCodec* output_codec, QObject* parent)
: QProcess(parent), m_err_decoder(output_codec), m_out_decoder(output_codec)
{
// QProcess has a strange interface... let's map a lot of those into a few.
connect(this, &QProcess::readyReadStandardOutput, this, &LoggedProcess::on_stdOut);