aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2017-03-24 13:38:50 +0100
committerMitch Curtis <mitch.curtis@qt.io>2017-03-24 12:44:02 +0000
commit7c7b58c732dd30f7e98c5a0894e341f112a3124c (patch)
treedc8765908a02e097afcab6703a0b9d663d0c4ebe
parentc4de17f8ce0abd2d97c99da2073131d15a93ab83 (diff)
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 <jpnurmi@qt.io>
-rw-r--r--src/quicktemplates2/qquickswipedelegate.cpp2
1 files changed, 1 insertions, 1 deletions
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<QQuickItem*>(component->beginCreate(context));
if (item) {