From fb2bb9501973da680f2abfa7b176c76881af5140 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 27 Dec 2022 16:57:23 +0100 Subject: [PATCH] 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 Reviewed-by: Fabian Kosmale (cherry picked from commit 114b94c26e990c792f2735b1104dd094ada714f6) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qtypeinfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index 1938967a91a..60fd280a41e 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -129,7 +129,7 @@ public: \ enum { \ isComplex = (((FLAGS) & Q_PRIMITIVE_TYPE) == 0) && !std::is_trivial_v, \ isRelocatable = !isComplex || ((FLAGS) & Q_RELOCATABLE_TYPE) || qIsRelocatable, \ - isPointer = false, \ + isPointer = std::is_pointer_v< TYPE >, \ isIntegral = std::is_integral< TYPE >::value, \ }; \ }