diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2019-08-13 17:11:48 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2019-09-12 17:41:17 +0200 |
commit | ba30971c7e3a89a79f0b91618bf95f515d8a16d1 (patch) | |
tree | f2e96693bf3ddafe07e22165dfd928a3a054e32c /src/qml/qml/qqmlcomponent.cpp | |
parent | 6848770529007af3eccf269419e5fe9220670e59 (diff) |
qquicklistview: support required properties in sectionDelegate
This changes the accessibile properties in the sectionDelegate:
If the sectionDelegate contains requiredProperties, "section" will not
be injected into a newly created parent scope.
Instead, the section property of the delegate will be set if it exists.
Change-Id: I34b04d08d2f80af7ea53fd722f08be0f9aea6e72
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r-- | src/qml/qml/qqmlcomponent.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index b72c745490..d651cbf636 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -345,6 +345,11 @@ RequiredProperties &QQmlComponentPrivate::requiredProperties() return state.creator->requiredProperties(); } +bool QQmlComponentPrivate::hadRequiredProperties() const +{ + return state.creator->componentHadRequiredProperties(); +} + void QQmlComponentPrivate::clear() { if (typeData) { |