aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels/qqmllistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlmodels/qqmllistmodel.cpp')
-rw-r--r--src/qmlmodels/qqmllistmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qmlmodels/qqmllistmodel.cpp b/src/qmlmodels/qqmllistmodel.cpp
index a9c58d59a5..b71931cc85 100644
--- a/src/qmlmodels/qqmllistmodel.cpp
+++ b/src/qmlmodels/qqmllistmodel.cpp
@@ -1112,7 +1112,7 @@ static void setQObjectOwnership(char *mem, QObject *o)
if (!ddata)
ddata = QQmlData::get(o, true);
- ddata->indestructible = true;
+ ddata->indestructible = ownership != 0;
ddata->explicitIndestructibleSet = false;
new (mem) ListElement::GuardedQObjectPointer(