QTypeInfo: fix pointer detection

Although redudant, people are allowed to use Q_DECLARE_TYPEINFO on a pointer
type. There's no reason to mis-detect the isPointer trait in that case.

Change-Id: Ic116f24397c91f5a3d31f5d8ee9fa2e587823257
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 114b94c26e990c792f2735b1104dd094ada714f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Giuseppe D'Angelo 2022-12-27 16:57:23 +01:00 committed by Qt Cherry-pick Bot
parent 6ed299f724
commit 9634579408

View File

@ -143,7 +143,7 @@ public: \
enum { \
isComplex = (((FLAGS) & Q_PRIMITIVE_TYPE) == 0) && !std::is_trivial_v<TYPE>, \
isRelocatable = !isComplex || ((FLAGS) & Q_RELOCATABLE_TYPE) || qIsRelocatable<TYPE>, \
isPointer = false, \
isPointer = std::is_pointer_v< TYPE >, \
isIntegral = std::is_integral< TYPE >::value, \
isValueInitializationBitwiseZero = qIsValueInitializationBitwiseZero<TYPE>, \
}; \