diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-02-12 15:22:19 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-02-14 08:01:37 +0000 |
commit | 9343fbc478e42c7aec3247486b25b34f1908e93b (patch) | |
tree | 680dc82535c9cf6efaa8657cb7c9a7110038dbfc /src | |
parent | dbc811e164019b5f9ce371cb7b49d695644f6a90 (diff) |
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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. |