diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 95845b7a9da..1c2665e53c0 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -2979,13 +2979,8 @@ bool QMetaType::hasRegisteredDataStreamOperators() const If this metatype represents an enumeration, this method returns a metatype of a numeric class of the same signedness and size as the enums underlying type. - If it represents a QFlags type, it returns a metatype of a numeric class - with the same signedness and size as that \l QFlags::Int type. + If it represents a QFlags type, it returns QMetaType::Int. In all other cases an invalid QMetaType is returned. - - Do note the metatype is synthesized from size and signedness and may thus - not match the actual underlying type of the enum itself. That is, it will - never return the metatype for \c{char}, \c{long}, \c{unsigned long}. */ QMetaType QMetaType::underlyingType() const { diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 80d850ff7a6..f3dee0433b2 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -1267,12 +1267,10 @@ namespace QtPrivate { template inline constexpr bool IsQmlListType = false; - template::value, bool = QtPrivate::IsQFlags::value> + template::value> constexpr bool IsUnsignedEnum = false; - template constexpr bool IsUnsignedEnum = - !std::is_signed_v>; - template constexpr bool IsUnsignedEnum = - !std::is_signed_v>; + template + constexpr bool IsUnsignedEnum = !std::is_signed_v>; template struct QMetaTypeTypeFlags