From 50132fb54b6e1b8b9f405eb42f6088d8ec7b3f3c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 18 Feb 2022 12:30:30 -0800 Subject: [PATCH] Logging: fix encoding of backtrace lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit File and function names are UTF-8 on Unix. Pick-to: 6.2 6.3 Change-Id: Ic15405335d804bdea761fffd16d4fb71ec2b0d71 Reviewed-by: Kai Koehne Reviewed-by: Tor Arne Vestbø --- src/corelib/global/qlogging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 7b8c030e54..0049f5ef35 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1297,7 +1297,7 @@ static QStringList backtraceFramesForLogMessage(int frameCount) int numberPrinted = 0; for (int i = 0; i < n && numberPrinted < frameCount; ++i) { QScopedPointer strings(backtrace_symbols(buffer.data() + i, 1)); - QString trace = QString::fromLatin1(strings.data()[0]); + QString trace = QString::fromUtf8(strings.data()[0]); QRegularExpressionMatch m = rx.match(trace); if (m.hasMatch()) { QString library = m.captured(1);