diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-11-18 12:57:09 -0800 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-05-20 04:59:43 +0000 |
commit | 8566c2db85a6f579a1a0432d0b7621633158e04c (patch) | |
tree | e3cec44d246660ac591803a7413a3e3122213a8f /src/corelib/plugin/quuid.cpp | |
parent | befda1accab417ce5f55cb11816e6ded51af55e3 (diff) |
QUuid: add support for 128-bit integers
[ChangeLog][QtCore][QUuid] Added support for converting between QUuid and
quint128, on platforms that offer 128-bit integer types (all 64-bit ones
supported by Qt, except MSVC).
Change-Id: Id8e48e8f498c4a029619fffd1728c9553e871df5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/plugin/quuid.cpp')
-rw-r--r-- | src/corelib/plugin/quuid.cpp | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp index baf9a8bd3e..dcf2529ef1 100644 --- a/src/corelib/plugin/quuid.cpp +++ b/src/corelib/plugin/quuid.cpp @@ -307,14 +307,42 @@ static QUuid createFromName(const QUuid &ns, const QByteArray &baseData, QCrypto Creates a QUuid based on the integral \a id128 parameter and respecting the byte order \a order. - \sa fromBytes(), toBytes(), toRfc4122() + \sa fromBytes(), toBytes(), toRfc4122(), toUInt128() +*/ + +/*! + \fn QUuid::QUuid(quint128 uuid, QSysInfo::Endian order) noexcept + \since 6.6 + + Creates a QUuid based on the integral \a uuid parameter and respecting the + byte order \a order. + + \note This function is only present on platforms that offer a 128-bit + integer type. + + \sa toUInt128(), fromBytes(), toBytes(), toRfc4122() +*/ + +/*! + \fn quint128 QUuid::toUInt128(QSysInfo::Endian order) const noexcept + \since 6.6 + + Returns a 128-bit integer created from this QUuid on the byte order + specified by \a order. The binary content of this function is the same as + toRfc4122() if the order is QSysInfo::BigEndian. See that function for more + details. + + \note This function is only present on platforms that offer a 128-bit + integer type. + + \sa toRfc4122(), toBytes(), fromBytes(), QUuid() */ /*! \fn QUuid::Id128Bytes QUuid::toBytes(QSysInfo::Endian order) const noexcept \since 6.6 - Returns an 128-bit ID created from this QUuid on the byte order specified + Returns a 128-bit ID created from this QUuid on the byte order specified by \a order. The binary content of this function is the same as toRfc4122() if the order is QSysInfo::BigEndian. See that function for more details. |