From 7c7b58c732dd30f7e98c5a0894e341f112a3124c Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 24 Mar 2017 13:38:50 +0100 Subject: QQuickSwipePrivate: parent delegate context to control This fixes a crash in QQuickSwipeDelegatePriavte's destructor when using QML debugging. Task-number: QTBUG-59532 Change-Id: I55f97039eb723652fec24e4c3a8ce5d1a8fb6c41 Reviewed-by: J-P Nurmi --- src/quicktemplates2/qquickswipedelegate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/quicktemplates2/qquickswipedelegate.cpp b/src/quicktemplates2/qquickswipedelegate.cpp index 7824708a..97a784b6 100644 --- a/src/quicktemplates2/qquickswipedelegate.cpp +++ b/src/quicktemplates2/qquickswipedelegate.cpp @@ -237,7 +237,7 @@ QQuickItem *QQuickSwipePrivate::createDelegateItem(QQmlComponent *component) // the creation context will be null and we have to create it ourselves. if (!creationContext) creationContext = qmlContext(control); - QQmlContext *context = new QQmlContext(creationContext); + QQmlContext *context = new QQmlContext(creationContext, control); context->setContextObject(control); QQuickItem *item = qobject_cast(component->beginCreate(context)); if (item) { -- cgit v1.2.3