aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-11-21 14:52:12 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-11-22 16:16:43 +0100
commite3a2b78cc2488ee247d59209dc53ebbfb785588e (patch)
tree08221ebae5b7b2e62d40b4ed8f68c66db6e109e4 /src/qml/qml/qqmlengine_p.h
parent2ba3b9cebe708e572807baa78fd141264a8ef627 (diff)
QtQml: Do not parent QQmlGadgetPtrWrapper instances to the engine
children of the QQmlEngine can be detected by user code or by the QML debugger. QQmlGadgetPtrWrapper is a particularly dangerous thing to stumble upon. Task-number: QTBUG-108704 Change-Id: I502419e03571f176b1223386635c97f5f9982549 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlengine_p.h')
-rw-r--r--src/qml/qml/qqmlengine_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h
index fe8439dc3e..6d27d7759c 100644
--- a/src/qml/qml/qqmlengine_p.h
+++ b/src/qml/qml/qqmlengine_p.h
@@ -212,7 +212,7 @@ public:
return *it;
if (QQmlValueType *valueType = QQmlMetaType::valueType(type)) {
- QQmlGadgetPtrWrapper *instance = new QQmlGadgetPtrWrapper(valueType, q_func());
+ QQmlGadgetPtrWrapper *instance = new QQmlGadgetPtrWrapper(valueType);
cachedValueTypeInstances.insert(typeIndex, instance);
return instance;
}