forgot to adapt this test
commit50e6ee1010682030b18a08d33ffac3afd08cdb01
authorAlbert Astals Cid <albert.astals@canonical.com>
dateThu 17 Mar 2016, 17:02 (11 years ago)
parentfdf9a7e
tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp+2−2
@@ -151,12 +151,12 @@ private:
151151
152152 QString section(QQuickItem *item)
153153 {
154− return item ? QQmlEngine::contextForObject(item)->parentContext()->contextProperty(QLatin1String("section")).toString() : QString();
154+ return item ? item->property("text").toString() : QString();
155155 }
156156
157157 int sectionDelegateIndex(QQuickItem *item)
158158 {
159− return item ? QQmlEngine::contextForObject(item)->parentContext()->contextProperty(QLatin1String("delegateIndex")).toInt() : -1;
159+ return item ? item->property("delegateIndex").toInt() : -1;
160160 }
161161
162162private Q_SLOTS:
tests/plugins/Dash/listviewwithpageheadertestsectionexternalmodel.qml+2−1
@@ -65,9 +65,10 @@ Rectangle {
6565 sectionProperty: "type"
6666 sectionDelegate: Component {
6767 Rectangle {
68+ property alias text: theText.text
6869 color: "green"
6970 height: 40
70− Text { text: section; font.pixelSize: 34 }
71+ Text { id: theText; font.pixelSize: 34 }
7172 anchors { left: parent.left; right: parent.right }
7273 }
7374 }