CTF: Simplify writing endianness to metadata

Change-Id: Ie10533dc22746c31941d5d60d2cc7aa81436fee0
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
(cherry picked from commit 8cedef62cf1b401d2c5ae08b03f92f95fd09df75)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Antti Määttä 2023-06-01 10:54:33 +03:00 committed by Qt Cherry-pick Bot
parent 4f5b6967bb
commit 94e83053ed

View File

@ -131,11 +131,7 @@ QCtfLibImpl::QCtfLibImpl()
metadata.replace(QStringLiteral("$CLOCK_NAME"), QStringLiteral("monotonic"));
metadata.replace(QStringLiteral("$CLOCK_TYPE"), QStringLiteral("Monotonic clock"));
metadata.replace(QStringLiteral("$CLOCK_OFFSET"), QString::number(datetime.toMSecsSinceEpoch() * 1000000));
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
metadata.replace(QStringLiteral("$ENDIANNESS"), QStringLiteral("be"));
#else
metadata.replace(QStringLiteral("$ENDIANNESS"), QStringLiteral("le"));
#endif
metadata.replace(QStringLiteral("$ENDIANNESS"), QSysInfo::ByteOrder == QSysInfo::BigEndian ? u"be"_s : u"le"_s);
writeMetadata(metadata, true);
m_timer.start();
}