aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2024-04-15 15:03:19 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2024-04-15 14:03:29 +0000
commit4b0f31e823723e4c10d9eb261e3e0fb732a9e712 (patch)
treecc02f0e0d38c29603e98ce71c8ff73c1fc36e569 /src/plugins/qmldesigner
parent3aec095e50a02ea62b319e52b0bf4cc9f0f81788 (diff)
QmlDesigner: Fix crash on shutdown
We have to set the correct onwership. For objects from C++ QJSEngine::CppOwnership is the default, unless the object comes from a function like here. Change-Id: Idc35e2b06656da228a55d78e5b41f84795a8aa6e Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner')
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.cpp b/src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.cpp
index 3daa6c4ecce..fc39b371375 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.cpp
@@ -151,6 +151,8 @@ PropertyEditorSubSelectionWrapper *QmlModelNodeProxy::registerSubSelectionWrappe
new PropertyEditorSubSelectionWrapper(node));
m_subselection.append(wrapper);
+ QJSEngine::setObjectOwnership(wrapper.data(), QJSEngine::CppOwnership);
+
return wrapper.data();
}