From 41181df0ef41f46873dc1ccbcc08ac9a2fbd94bc Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 22 Apr 2024 17:01:20 +0200 Subject: [PATCH] QmlDesigner: Set proper ownership on returned C++ object Change-Id: Id9971cdec65bb84b310196ef84d0bccca9a12e57 Reviewed-by: Tim Jenssen --- .../components/propertyeditor/dynamicpropertiesproxymodel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/qmldesigner/components/propertyeditor/dynamicpropertiesproxymodel.cpp b/src/plugins/qmldesigner/components/propertyeditor/dynamicpropertiesproxymodel.cpp index 6fb45cc9250..ec5fe4475c2 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/dynamicpropertiesproxymodel.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/dynamicpropertiesproxymodel.cpp @@ -274,6 +274,8 @@ PropertyEditorValue *DynamicPropertyRow::createProxyBackendValue() auto *newValue = new PropertyEditorValue(this); m_proxyBackendValues.append(newValue); + QQmlEngine::setObjectOwnership(newValue, QJSEngine::CppOwnership); + return newValue; }