From 78165c6b83f71c08724993855d16aa01d471a11c Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 10 Aug 2023 15:29:37 +0200 Subject: [PATCH] QUuid: make (quint128) ctor explicit It matches any integral type, any unscoped enum and any FP type, so we can't allow it to be implicit. In fact, it's probably better to only have a named contructor, fromUint128(). Found in API review. Change-Id: I9b250e0b5e74a449b6df4efe3ea38b750c9744ed Reviewed-by: Thiago Macieira (cherry picked from commit 7bbd707299581840fa0ab369dd826102899cd2ee) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/plugin/quuid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h index 2cefb4d764f..63007315176 100644 --- a/src/corelib/plugin/quuid.h +++ b/src/corelib/plugin/quuid.h @@ -101,7 +101,7 @@ public: bool isNull() const noexcept; #ifdef QT_SUPPORTS_INT128 - constexpr QUuid(quint128 uuid, QSysInfo::Endian order = QSysInfo::BigEndian) noexcept; + constexpr explicit QUuid(quint128 uuid, QSysInfo::Endian order = QSysInfo::BigEndian) noexcept; constexpr quint128 toUInt128(QSysInfo::Endian order = QSysInfo::BigEndian) const noexcept; #endif