From 8b371173c4fed7df453a0e352af54e3363709d4b Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 28 Mar 2014 18:41:26 +0100 Subject: Fix visual parent ownership with scenes that create windows Commit 39540124dd0900e0c99dcda8c0ebdf4f3cea8d5e introduced the concept that a visual parent marks its children, by recursively marking the children of the root item in a QQuickView. This allowed for the removal of an ugly hack in QtQuick Controls. Unfortunately that fix is incomplete in the sense that it makes the incorrect assumption that a QQuickView is always used. The use-case in the bug report is to have child items inside a QtQuick.Window (a regular ApplicationWindow in fact). That window - implemented by QQuickWindowQmlImpl - also needs to mark its children, so this patch introduces the use of the same GC marking helper class (which now operates on a QQuickWindow instead of a QQuickViewPrivate). Task-number: QTBUG-37711 Change-Id: Id788e84dbb041ac8ba6ff23dc4ef56f6fe9e465a Reviewed-by: Lars Knoll --- src/quick/items/qquickview_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/quick/items/qquickview_p.h') diff --git a/src/quick/items/qquickview_p.h b/src/quick/items/qquickview_p.h index 74e40081e9..dfc8c21d0b 100644 --- a/src/quick/items/qquickview_p.h +++ b/src/quick/items/qquickview_p.h @@ -106,7 +106,7 @@ struct QQuickRootItemMarker : public QV4::Object { V4_OBJECT - QQuickRootItemMarker(QQuickViewPrivate *view); + QQuickRootItemMarker(QQmlEngine *engine, QQuickWindow *window); static void destroy(Managed *that) { @@ -115,7 +115,7 @@ struct QQuickRootItemMarker : public QV4::Object static void markObjects(Managed *that, QV4::ExecutionEngine *e); - QQuickViewPrivate *view; + QQuickWindow *window; }; QT_END_NAMESPACE -- cgit v1.2.3