on xenial help sign in
forgot to adapt this test
50e6ee1Albert Astals Cid
tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp+2−2
@@ -151,12 +151,12 @@ private:
151
151
152 QString section(QQuickItem *item)
152 QString section(QQuickItem *item)
153 {
153 {
154− return item ? QQmlEngine::contextForObject(item)->parentContext()->contextProperty(QLatin1String("section")).toString() : QString();
154+ return item ? item->property("text").toString() : QString();
155 }
155 }
156
156
157 int sectionDelegateIndex(QQuickItem *item)
157 int sectionDelegateIndex(QQuickItem *item)
158 {
158 {
159− return item ? QQmlEngine::contextForObject(item)->parentContext()->contextProperty(QLatin1String("delegateIndex")).toInt() : -1;
159+ return item ? item->property("delegateIndex").toInt() : -1;
160 }
160 }
161
161
162private Q_SLOTS:
162private Q_SLOTS:
tests/plugins/Dash/listviewwithpageheadertestsectionexternalmodel.qml+2−1
@@ -65,9 +65,10 @@ Rectangle {
65 sectionProperty: "type"
65 sectionProperty: "type"
66 sectionDelegate: Component {
66 sectionDelegate: Component {
67 Rectangle {
67 Rectangle {
68+ property alias text: theText.text
68 color: "green"
69 color: "green"
69 height: 40
70 height: 40
70− Text { text: section; font.pixelSize: 34 }
71+ Text { id: theText; font.pixelSize: 34 }
71 anchors { left: parent.left; right: parent.right }
72 anchors { left: parent.left; right: parent.right }
72 }
73 }
73 }
74 }