summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-02-18 12:30:30 -0800
committerThiago Macieira <thiago.macieira@intel.com>2022-03-03 19:05:11 -0800
commit50132fb54b6e1b8b9f405eb42f6088d8ec7b3f3c (patch)
tree0a2d1b8919f05d2cd9c896f9f3c5c0f6b00090b5 /src/corelib/global
parentd589f3eefef2be1797ffcc5ee785beeffae0a247 (diff)
Logging: fix encoding of backtrace lines
File and function names are UTF-8 on Unix. Pick-to: 6.2 6.3 Change-Id: Ic15405335d804bdea761fffd16d4fb71ec2b0d71 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qlogging.cpp2
1 files changed, 1 insertions, 1 deletions
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<char*, QScopedPointerPodDeleter> 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);