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>
This commit is contained in:
parent
d589f3eefe
commit
50132fb54b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user