diff options
author | Antti Määttä <[email protected]> | 2023-06-01 10:54:33 +0300 |
---|---|---|
committer | Qt Cherry-pick Bot <[email protected]> | 2023-08-01 08:15:13 +0000 |
commit | 94e83053edd3ea6e38b19d7c6f38ee3ad6c9023a (patch) | |
tree | d19135483c8dcb50fdc0dce6b7e4740deaecc5ba | |
parent | 4f5b6967bb92f01af6d6c9821c2f35fbada22b84 (diff) |
CTF: Simplify writing endianness to metadata
Change-Id: Ie10533dc22746c31941d5d60d2cc7aa81436fee0
Reviewed-by: Hatem ElKharashy <[email protected]>
Reviewed-by: Janne Koskinen <[email protected]>
(cherry picked from commit 8cedef62cf1b401d2c5ae08b03f92f95fd09df75)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
-rw-r--r-- | src/plugins/tracing/qctflib.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/plugins/tracing/qctflib.cpp b/src/plugins/tracing/qctflib.cpp index ec1b22f2120..783be079f71 100644 --- a/src/plugins/tracing/qctflib.cpp +++ b/src/plugins/tracing/qctflib.cpp @@ -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(); } |