summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/quuid.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-08-10 15:38:56 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-08-11 13:08:52 +0200
commit70835a93351b3288a8df4361e648b9cd951ad436 (patch)
treeb71df3094af2b9a1bb3d35317246e60ce866304c /src/corelib/plugin/quuid.h
parent7bbd707299581840fa0ab369dd826102899cd2ee (diff)
QUuid: add a named fromUInt128() ctor
This makes the API symmetric again (fromBytes()/toBytes(), fromString()/toString(), fromUInt128()/toUInt128()), but also gives us the option to remove the QUuid(quint128), should we so choose, because of its overly-broad argument matching range. Found in API review. Pick-to: 6.6 Change-Id: I91bd2450d62ed565ec3b8e46c875f4983bd9dc73 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/plugin/quuid.h')
-rw-r--r--src/corelib/plugin/quuid.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h
index 6300731517..2f1927afa2 100644
--- a/src/corelib/plugin/quuid.h
+++ b/src/corelib/plugin/quuid.h
@@ -102,6 +102,8 @@ public:
#ifdef QT_SUPPORTS_INT128
constexpr explicit QUuid(quint128 uuid, QSysInfo::Endian order = QSysInfo::BigEndian) noexcept;
+ static constexpr QUuid fromUInt128(quint128 uuid, QSysInfo::Endian order = QSysInfo::BigEndian) noexcept
+ { return QUuid{uuid, order}; }
constexpr quint128 toUInt128(QSysInfo::Endian order = QSysInfo::BigEndian) const noexcept;
#endif