aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2019-08-13 17:11:48 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2019-09-12 17:41:17 +0200
commitba30971c7e3a89a79f0b91618bf95f515d8a16d1 (patch)
treef2e96693bf3ddafe07e22165dfd928a3a054e32c /src/qml/qml
parent6848770529007af3eccf269419e5fe9220670e59 (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')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp5
-rw-r--r--src/qml/qml/qqmlcomponent_p.h1
2 files changed, 6 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) {
diff --git a/src/qml/qml/qqmlcomponent_p.h b/src/qml/qml/qqmlcomponent_p.h
index 8ae7672c19..a919eb45c0 100644
--- a/src/qml/qml/qqmlcomponent_p.h
+++ b/src/qml/qml/qqmlcomponent_p.h
@@ -108,6 +108,7 @@ public:
int start;
RequiredProperties& requiredProperties();
+ bool hadRequiredProperties() const;
QQmlRefPointer<QV4::ExecutableCompilationUnit> compilationUnit;
struct ConstructionState {