From 77e577592e64ab9b099de09c281140c60c898df7 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Thu, 12 Sep 2019 12:05:09 +0200 Subject: QQuickStackElemnt: fix compilation While QQuickStack should ideally completely support required properties, by setting them accordingly if provided in StackView.push, for now it compiles at least again. Fixes: QTBUG-78252 Change-Id: Ib8efc7a1c9f0779ca972307ca95e632f51c6ca46 Reviewed-by: Liang Qi --- src/quicktemplates2/qquickstackelement.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/quicktemplates2/qquickstackelement.cpp b/src/quicktemplates2/qquickstackelement.cpp index 7ae5c495..4c14022a 100644 --- a/src/quicktemplates2/qquickstackelement.cpp +++ b/src/quicktemplates2/qquickstackelement.cpp @@ -44,6 +44,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -210,7 +211,12 @@ void QQuickStackElement::initialize() QV4::ScopedValue ipv(scope, properties.value()); QV4::Scoped qmlContext(scope, qmlCallingContext.value()); QV4::ScopedValue qmlObject(scope, QV4::QObjectWrapper::wrap(v4, item)); +#if Q_QML_PRIVATE_API_VERSION >= 6 + RequiredProperties requiredPropertiesCurrentlyNotSupported; + QQmlComponentPrivate::setInitialProperties(v4, qmlContext, qmlObject, ipv, requiredPropertiesCurrentlyNotSupported, item); +#else QQmlComponentPrivate::setInitialProperties(v4, qmlContext, qmlObject, ipv); +#endif properties.clear(); } -- cgit v1.2.3