From 9343fbc478e42c7aec3247486b25b34f1908e93b Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 12 Feb 2019 15:22:19 +0100 Subject: PropertCache: Don't pass Q_GADGET value types as integers We need to check for the IsGadget flag there. Fixes: QTBUG-73734 Change-Id: Ic4afd4215e6ed346bc40794d85397f0f262715e2 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlpropertycache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/qml/qqmlpropertycache.cpp') diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index f91ba78932..95bdcf13e8 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -929,8 +929,8 @@ static bool passTypeAsInt(int type) if (type < int(QMetaType::User)) return false; - // Pointers to QObjects and QGadgets can be handled as they are. - if (flags & (QMetaType::PointerToQObject | QMetaType::PointerToGadget)) + // Pointers to QObjects and QGadgets, and QGadgets themselves can be handled as they are. + if (flags & (QMetaType::PointerToQObject | QMetaType::PointerToGadget | QMetaType::IsGadget)) return false; // If it wasn't declared as metatype, better don't touch it. -- cgit v1.2.3