Commit 0023c870 authored by Ulf Hermann's avatar Ulf Hermann

QmlProfiler: Don't add junk to the end of strings from QmlEvents

The UTF-8 data stored in the event is not necessarily null-terminated.

Change-Id: Id5d4f0b50f8c7c70aa6576121905072984f1c342
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent 6de290a1
......@@ -159,9 +159,9 @@ struct QmlEvent {
{
switch (m_dataType) {
case External8Bit:
return QString::fromUtf8(static_cast<const char *>(m_data.external));
return QString::fromUtf8(static_cast<const char *>(m_data.external), m_dataLength);
case Inline8Bit:
return QString::fromUtf8(m_data.internalChar);
return QString::fromUtf8(m_data.internalChar, m_dataLength);
default:
Q_UNREACHABLE();
return QString();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment