diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2019-09-12 12:05:09 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2019-09-12 13:19:55 +0200 |
commit | 77e577592e64ab9b099de09c281140c60c898df7 (patch) | |
tree | 89d8f8974f3279c461fc78762d3ed701dc7dd051 | |
parent | 7542a6bb74b27fcc39a5b82ef1e5f84853cda4e1 (diff) |
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 <liang.qi@qt.io>
-rw-r--r-- | src/quicktemplates2/qquickstackelement.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 <QtQml/private/qv4qobjectwrapper_p.h> #include <QtQml/private/qqmlcomponent_p.h> #include <QtQml/private/qqmlengine_p.h> +#include <QtQml/private/qqmlapiversion_p.h> QT_BEGIN_NAMESPACE @@ -210,7 +211,12 @@ void QQuickStackElement::initialize() QV4::ScopedValue ipv(scope, properties.value()); QV4::Scoped<QV4::QmlContext> 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(); } |