summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-05-20 11:01:33 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-05-25 04:56:54 +0000
commit6ea6881ec8847dc99e05534769d6fe6198f56ead (patch)
treea7905d6043557f7fafdfb4a074000ecb2636089e
parent6ac2471c5e8d75282a22c5749bf9ffc9be8cc19f (diff)
QQuickStackView: fix buildv5.6.1-1v5.6.1
error: no matching function for call to 'QQmlComponentPrivate::initializeObjectWithInitialProperties(QV4::ScopedValue&, QQuickItem*&)' (cherry picked from commit 6fe784b9696fc19eb8f2ba24f187d2cea4434c53) Change-Id: Ic3db50f44912d9e5cdb71f6712fff554fc76505e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/templates/qquickstackview_p.cpp4
-rw-r--r--src/templates/qquickstackview_p_p.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/templates/qquickstackview_p.cpp b/src/templates/qquickstackview_p.cpp
index 101f1f68..05558a95 100644
--- a/src/templates/qquickstackview_p.cpp
+++ b/src/templates/qquickstackview_p.cpp
@@ -179,7 +179,8 @@ void QQuickStackElement::initialize()
Q_ASSERT(v4);
QV4::Scope scope(v4);
QV4::ScopedValue ipv(scope, properties.value());
- d->initializeObjectWithInitialProperties(ipv, item);
+ QV4::Scoped<QV4::QmlContext> qmlContext(scope, qmlCallingContext.value());
+ d->initializeObjectWithInitialProperties(qmlContext, ipv, item);
properties.clear();
}
@@ -274,6 +275,7 @@ static bool initProperties(QQuickStackElement *element, const QV4::Value &props,
if (!wrapper) {
QV4::ExecutionEngine *v4 = args->v4engine();
element->properties.set(v4, props);
+ element->qmlCallingContext.set(v4, v4->qmlContext());
return true;
}
}
diff --git a/src/templates/qquickstackview_p_p.h b/src/templates/qquickstackview_p_p.h
index d14c6326..97cdb109 100644
--- a/src/templates/qquickstackview_p_p.h
+++ b/src/templates/qquickstackview_p_p.h
@@ -98,6 +98,7 @@ public:
QPointer<QQuickItem> originalParent;
QQuickStackView::Status status;
QV4::PersistentValue properties;
+ QV4::PersistentValue qmlCallingContext;
};
class QQuickStackViewPrivate : public QQuickControlPrivate, public QQuickItemViewTransitionChangeListener