Merge lp:~aacid/unity8/dashSectionDelegateUpdateFix into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Zanetti
Approved revision: 2657
Merged at revision: 2680
Proposed branch: lp:~aacid/unity8/dashSectionDelegateUpdateFix
Merge into: lp:unity8
Diff against target: 569 lines (+62/-71)
4 files modified
plugins/Dash/listviewwithpageheader.cpp (+4/-12)
qml/Dash/GenericScopeView.qml (+1/-2)
tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp (+3/-3)
tests/plugins/Dash/listviewwithpageheadersectiontest.cpp (+54/-54)
To merge this branch: bzr merge lp:~aacid/unity8/dashSectionDelegateUpdateFix
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
Paweł Stołowski (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+307798@code.launchpad.net

Commit message

Improve LVWPH <-> GenericScopeView interaction

Send up directly the delegate instead of the delegateIndex and then asking back for the delegate

Saves time and also if the delegateIndex is the same number but the delegate different the delegate won't be updated because QML doesn't know it's different

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2656
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2328/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3065
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1711
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1711
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1711
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3093
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2950
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2950/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2950
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2950/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2950
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2950/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2950
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2950/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2950
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2950/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2950
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2950/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2950
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2950/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2950
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2950/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2950
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2950/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2328/rebuild

review: Needs Fixing (continuous-integration)
2657. By Albert Astals Cid

item() function is still needed on other parts of GenericScopeView ^_^

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2657
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2330/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3068
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1714
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1714
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1714
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3096
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2953
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2953/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2953
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2953/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2953
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2953/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2953
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2953/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2953
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2953/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2953
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2953/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2953
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2953/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2953
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2953/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2953
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2953/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2330/rebuild

review: Approve (continuous-integration)
Revision history for this message
Paweł Stołowski (stolowski) wrote :

I've tested the resulting debs for this MP and I can't reproduce the issue with it anymore, thanks! +1 from me.

review: Approve
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Code looks sane to me

* tested by Pawel

* CI is happy too

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/Dash/listviewwithpageheader.cpp'
--- plugins/Dash/listviewwithpageheader.cpp 2016-09-22 07:35:29 +0000
+++ plugins/Dash/listviewwithpageheader.cpp 2016-10-06 10:54:33 +0000
@@ -772,7 +772,7 @@
772 delete nobj;772 delete nobj;
773 } else {773 } else {
774 sectionItem->setProperty("text", sectionText);774 sectionItem->setProperty("text", sectionText);
775 sectionItem->setProperty("delegateIndex", -1);775 sectionItem->setProperty("delegate", QVariant());
776 sectionItem->setZ(2);776 sectionItem->setZ(2);
777 QQml_setParent_noEvent(sectionItem, m_clipItem);777 QQml_setParent_noEvent(sectionItem, m_clipItem);
778 sectionItem->setParentItem(m_clipItem);778 sectionItem->setParentItem(m_clipItem);
@@ -929,7 +929,7 @@
929 polish();929 polish();
930 }930 }
931 if (listItem->sectionItem()) {931 if (listItem->sectionItem()) {
932 listItem->sectionItem()->setProperty("delegateIndex", modelIndex);932 listItem->sectionItem()->setProperty("delegate", QVariant::fromValue(listItem->m_item));
933 }933 }
934 adjustMinYExtent();934 adjustMinYExtent();
935 m_contentHeightDirty = true;935 m_contentHeightDirty = true;
@@ -1123,7 +1123,7 @@
1123 for (int i = 0; i < m_visibleItems.count(); ++i) {1123 for (int i = 0; i < m_visibleItems.count(); ++i) {
1124 ListItem *item = m_visibleItems[i];1124 ListItem *item = m_visibleItems[i];
1125 if (item->sectionItem()) {1125 if (item->sectionItem()) {
1126 item->sectionItem()->setProperty("delegateIndex", m_firstVisibleIndex + i);1126 item->sectionItem()->setProperty("delegate", QVariant::fromValue(item->m_item));
1127 }1127 }
1128 }1128 }
11291129
@@ -1297,15 +1297,7 @@
12971297
1298 QQuickItemPrivate::get(m_topSectionItem)->setCulled(false);1298 QQuickItemPrivate::get(m_topSectionItem)->setCulled(false);
1299 m_topSectionItem->setY(topSectionStickPos);1299 m_topSectionItem->setY(topSectionStickPos);
1300 int delegateIndex = modelIndex;1300 m_topSectionItem->setProperty("delegate", QVariant::fromValue(item->m_item));
1301 // Look for the first index with this section text
1302 while (delegateIndex > 0) {
1303 const QString prevSection = m_delegateModel->stringValue(delegateIndex - 1, m_sectionProperty);
1304 if (prevSection != section)
1305 break;
1306 delegateIndex--;
1307 }
1308 m_topSectionItem->setProperty("delegateIndex", delegateIndex);
1309 if (item->sectionItem()) {1301 if (item->sectionItem()) {
1310 QQuickItemPrivate::get(item->sectionItem())->setCulled(true);1302 QQuickItemPrivate::get(item->sectionItem())->setCulled(true);
1311 }1303 }
13121304
=== modified file 'qml/Dash/GenericScopeView.qml'
--- qml/Dash/GenericScopeView.qml 2016-09-22 07:37:21 +0000
+++ qml/Dash/GenericScopeView.qml 2016-10-06 10:54:33 +0000
@@ -623,8 +623,7 @@
623 sectionProperty: "name"623 sectionProperty: "name"
624 sectionDelegate: ListItems.Header {624 sectionDelegate: ListItems.Header {
625 objectName: "dashSectionHeader" + (delegate ? delegate.category : "")625 objectName: "dashSectionHeader" + (delegate ? delegate.category : "")
626 property int delegateIndex: -1626 property var delegate: null
627 readonly property var delegate: categoryView.item(delegateIndex)
628 width: categoryView.width627 width: categoryView.width
629 height: text != "" ? units.gu(5) : 0628 height: text != "" ? units.gu(5) : 0
630 color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText629 color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
631630
=== modified file 'tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp'
--- tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp 2016-06-27 18:44:41 +0000
+++ tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp 2016-10-06 10:54:33 +0000
@@ -82,7 +82,7 @@
82 QCOMPARE(section(lvwph->m_visibleItems[visibleIndex]->sectionItem()), sectionHeader);82 QCOMPARE(section(lvwph->m_visibleItems[visibleIndex]->sectionItem()), sectionHeader);
83 if (!sectionHeader.isNull()) {83 if (!sectionHeader.isNull()) {
84 QCOMPARE(QQuickItemPrivate::get(lvwph->m_visibleItems[visibleIndex]->sectionItem())->culled, sectionHeaderCulled);84 QCOMPARE(QQuickItemPrivate::get(lvwph->m_visibleItems[visibleIndex]->sectionItem())->culled, sectionHeaderCulled);
85 QCOMPARE(sectionDelegateIndex(lvwph->m_visibleItems[visibleIndex]->sectionItem()), lvwph->m_firstVisibleIndex + visibleIndex);85 QCOMPARE(sectionDelegate(lvwph->m_visibleItems[visibleIndex]->sectionItem()), lvwph->m_visibleItems[visibleIndex]->m_item);
86 }86 }
87 }87 }
8888
@@ -151,9 +151,9 @@
151 return item ? item->property("text").toString() : QString();151 return item ? item->property("text").toString() : QString();
152 }152 }
153153
154 int sectionDelegateIndex(QQuickItem *item)154 QQuickItem *sectionDelegate(QQuickItem *item)
155 {155 {
156 return item ? item->property("delegateIndex").toInt() : -1;156 return item ? item->property("delegate").value<QQuickItem *>() : nullptr;
157 }157 }
158158
159private Q_SLOTS:159private Q_SLOTS:
160160
=== modified file 'tests/plugins/Dash/listviewwithpageheadersectiontest.cpp'
--- tests/plugins/Dash/listviewwithpageheadersectiontest.cpp 2016-06-27 18:44:41 +0000
+++ tests/plugins/Dash/listviewwithpageheadersectiontest.cpp 2016-10-06 10:54:33 +0000
@@ -39,7 +39,7 @@
39 QCOMPARE(section(lvwph->m_visibleItems[visibleIndex]->sectionItem()), sectionHeader);39 QCOMPARE(section(lvwph->m_visibleItems[visibleIndex]->sectionItem()), sectionHeader);
40 if (!sectionHeader.isNull()) {40 if (!sectionHeader.isNull()) {
41 QCOMPARE(QQuickItemPrivate::get(lvwph->m_visibleItems[visibleIndex]->sectionItem())->culled, sectionHeaderCulled);41 QCOMPARE(QQuickItemPrivate::get(lvwph->m_visibleItems[visibleIndex]->sectionItem())->culled, sectionHeaderCulled);
42 QCOMPARE(sectionDelegateIndex(lvwph->m_visibleItems[visibleIndex]->sectionItem()), lvwph->m_firstVisibleIndex + visibleIndex);42 QCOMPARE(sectionDelegate(lvwph->m_visibleItems[visibleIndex]->sectionItem()), lvwph->m_visibleItems[visibleIndex]->m_item);
43 }43 }
44 }44 }
4545
@@ -116,9 +116,9 @@
116 return item ? item->property("text").toString() : QString();116 return item ? item->property("text").toString() : QString();
117 }117 }
118118
119 int sectionDelegateIndex(QQuickItem *item) const119 QQuickItem *sectionDelegate(QQuickItem *item) const
120 {120 {
121 return item ? item->property("delegateIndex").toInt() : -1;121 return item ? item->property("delegate").value<QQuickItem *>() : nullptr;
122 }122 }
123123
124private Q_SLOTS:124private Q_SLOTS:
@@ -220,7 +220,7 @@
220 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);220 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
221 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);221 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
222 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));222 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
223 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);223 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
224 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);224 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
225 }225 }
226226
@@ -242,7 +242,7 @@
242 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);242 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
243 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);243 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
244 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));244 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
245 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);245 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
246 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);246 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
247 }247 }
248248
@@ -264,7 +264,7 @@
264 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);264 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
265 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);265 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
266 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));266 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));
267 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 0);267 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
268 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);268 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
269269
270 changeContentY(-30);270 changeContentY(-30);
@@ -283,7 +283,7 @@
283 QCOMPARE(lvwph->m_headerItemShownHeight, 30.);283 QCOMPARE(lvwph->m_headerItemShownHeight, 30.);
284 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);284 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
285 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));285 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));
286 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 0);286 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
287 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);287 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
288 }288 }
289289
@@ -339,7 +339,7 @@
339 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);339 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
340 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);340 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
341 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));341 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
342 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);342 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
343 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);343 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
344344
345 lvwph->positionAtBeginning();345 lvwph->positionAtBeginning();
@@ -365,7 +365,7 @@
365 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);365 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
366 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);366 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
367 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));367 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
368 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);368 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
369 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);369 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
370370
371 lvwph->positionAtBeginning();371 lvwph->positionAtBeginning();
@@ -410,7 +410,7 @@
410 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);410 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
411 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);411 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
412 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));412 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
413 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);413 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
414 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);414 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
415415
416 model->setProperty(0, "size", 400);416 model->setProperty(0, "size", 400);
@@ -430,7 +430,7 @@
430 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);430 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
431 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);431 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
432 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));432 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
433 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);433 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
434 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);434 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
435435
436 scrollToTop();436 scrollToTop();
@@ -484,7 +484,7 @@
484 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);484 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
485 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);485 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
486 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));486 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
487 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);487 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
488 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);488 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
489489
490 model->setProperty(0, "size", 400);490 model->setProperty(0, "size", 400);
@@ -504,7 +504,7 @@
504 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);504 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
505 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);505 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
506 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));506 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
507 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);507 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
508 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);508 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
509509
510 scrollToTop();510 scrollToTop();
@@ -541,7 +541,7 @@
541 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);541 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
542 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);542 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
543 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));543 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));
544 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 3);544 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
545 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);545 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
546546
547 changeContentY(-30);547 changeContentY(-30);
@@ -559,7 +559,7 @@
559 QCOMPARE(lvwph->m_headerItemShownHeight, 30.);559 QCOMPARE(lvwph->m_headerItemShownHeight, 30.);
560 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);560 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
561 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));561 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));
562 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 3);562 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
563 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);563 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
564564
565 changeContentY(30);565 changeContentY(30);
@@ -577,7 +577,7 @@
577 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);577 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
578 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);578 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
579 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));579 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));
580 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 3);580 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
581 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);581 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
582582
583 changeContentY(-30);583 changeContentY(-30);
@@ -595,7 +595,7 @@
595 QCOMPARE(lvwph->m_headerItemShownHeight, 30.);595 QCOMPARE(lvwph->m_headerItemShownHeight, 30.);
596 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);596 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
597 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));597 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));
598 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 3);598 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
599 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);599 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
600 }600 }
601601
@@ -616,7 +616,7 @@
616 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);616 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
617 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);617 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
618 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));618 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));
619 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 3);619 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
620 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);620 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
621621
622 lvwph->setDelegate(otherDelegate);622 lvwph->setDelegate(otherDelegate);
@@ -675,7 +675,7 @@
675 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);675 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
676 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);676 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
677 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));677 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));
678 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 3);678 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
679 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);679 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
680680
681 scrollToTop();681 scrollToTop();
@@ -714,7 +714,7 @@
714 QTRY_VERIFY(lvwph->isAtYEnd());714 QTRY_VERIFY(lvwph->isAtYEnd());
715 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);715 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
716 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));716 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));
717 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 3);717 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
718 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);718 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
719719
720 scrollToTop();720 scrollToTop();
@@ -751,7 +751,7 @@
751 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);751 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
752 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);752 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
753 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));753 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));
754 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 0);754 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
755 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);755 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
756 }756 }
757757
@@ -836,7 +836,7 @@
836 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);836 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
837 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);837 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
838 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));838 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
839 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);839 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
840 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);840 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
841841
842 QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 1), Q_ARG(QVariant, 100), Q_ARG(QVariant, "Agressive"));842 QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 1), Q_ARG(QVariant, 100), Q_ARG(QVariant, "Agressive"));
@@ -857,7 +857,7 @@
857 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);857 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
858 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);858 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
859 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));859 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
860 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 4);860 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
861 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);861 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
862862
863 scrollToTop();863 scrollToTop();
@@ -898,7 +898,7 @@
898 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);898 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
899 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);899 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
900 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));900 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));
901 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 0);901 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
902 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);902 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
903903
904 QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 3), Q_ARG(QVariant, 100), Q_ARG(QVariant, "Agressive"));904 QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 3), Q_ARG(QVariant, 100), Q_ARG(QVariant, "Agressive"));
@@ -919,7 +919,7 @@
919 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);919 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
920 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);920 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
921 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));921 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));
922 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 0);922 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
923 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);923 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
924 }924 }
925925
@@ -942,7 +942,7 @@
942 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);942 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
943 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);943 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
944 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));944 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
945 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);945 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
946 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);946 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
947947
948 QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 1), Q_ARG(QVariant, 100), Q_ARG(QVariant, "Agressive"));948 QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 1), Q_ARG(QVariant, 100), Q_ARG(QVariant, "Agressive"));
@@ -963,7 +963,7 @@
963 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);963 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
964 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);964 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
965 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));965 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
966 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 4);966 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
967 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);967 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
968 }968 }
969969
@@ -986,7 +986,7 @@
986 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);986 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
987 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);987 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
988 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));988 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
989 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);989 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
990 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);990 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
991991
992 QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 1), Q_ARG(QVariant, 100), Q_ARG(QVariant, "Agressive"));992 QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 1), Q_ARG(QVariant, 100), Q_ARG(QVariant, "Agressive"));
@@ -1007,7 +1007,7 @@
1007 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1007 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1008 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1008 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1009 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));1009 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
1010 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 3);1010 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1011 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1011 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
10121012
1013 scrollToTop();1013 scrollToTop();
@@ -1055,7 +1055,7 @@
1055 QVERIFY(!lvwph->isAtYEnd());1055 QVERIFY(!lvwph->isAtYEnd());
1056 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1056 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1057 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));1057 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));
1058 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 3);1058 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1059 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1059 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
10601060
1061 scrollToBottom();1061 scrollToBottom();
@@ -1076,7 +1076,7 @@
1076 QVERIFY(lvwph->isAtYEnd());1076 QVERIFY(lvwph->isAtYEnd());
1077 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1077 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1078 QCOMPARE(section(lvwph->m_topSectionItem), QString("Lazy"));1078 QCOMPARE(section(lvwph->m_topSectionItem), QString("Lazy"));
1079 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 5);1079 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1080 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1080 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1081 }1081 }
10821082
@@ -1130,7 +1130,7 @@
1130 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1130 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1131 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1131 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1132 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));1132 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));
1133 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 13);1133 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1134 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1134 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
11351135
1136 changeContentY(-1700);1136 changeContentY(-1700);
@@ -1155,7 +1155,7 @@
1155 QCOMPARE(lvwph->m_headerItemShownHeight, 50.);1155 QCOMPARE(lvwph->m_headerItemShownHeight, 50.);
1156 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1156 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1157 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));1157 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
1158 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 4);1158 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[3]->m_item);
1159 QCOMPARE(lvwph->m_topSectionItem->y(), -23.);1159 QCOMPARE(lvwph->m_topSectionItem->y(), -23.);
1160 }1160 }
11611161
@@ -1217,7 +1217,7 @@
1217 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1217 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1218 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1218 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1219 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));1219 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));
1220 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);1220 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1221 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1221 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1222 }1222 }
12231223
@@ -1241,7 +1241,7 @@
1241 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1241 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1242 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1242 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1243 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));1243 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
1244 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);1244 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1245 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1245 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1246 }1246 }
12471247
@@ -1264,7 +1264,7 @@
1264 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1264 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1265 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1265 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1266 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));1266 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
1267 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);1267 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1268 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1268 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
12691269
1270 QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 1), Q_ARG(QVariant, 1));1270 QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 1), Q_ARG(QVariant, 1));
@@ -1284,7 +1284,7 @@
1284 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1284 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1285 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1285 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1286 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));1286 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
1287 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);1287 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1288 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1288 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1289 }1289 }
12901290
@@ -1307,7 +1307,7 @@
1307 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1307 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1308 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1308 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1309 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));1309 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
1310 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);1310 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1311 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1311 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
13121312
1313 QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 3), Q_ARG(QVariant, 1));1313 QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 3), Q_ARG(QVariant, 1));
@@ -1327,7 +1327,7 @@
1327 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1327 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1328 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1328 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1329 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));1329 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
1330 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);1330 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1331 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1331 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1332 }1332 }
13331333
@@ -1407,7 +1407,7 @@
1407 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1407 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1408 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1408 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1409 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));1409 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));
1410 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 3);1410 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1411 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1411 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
14121412
1413 QMetaObject::invokeMethod(model, "moveItems", Q_ARG(QVariant, 0), Q_ARG(QVariant, 5), Q_ARG(QVariant, 1));1413 QMetaObject::invokeMethod(model, "moveItems", Q_ARG(QVariant, 0), Q_ARG(QVariant, 5), Q_ARG(QVariant, 1));
@@ -1428,7 +1428,7 @@
1428 QVERIFY(!lvwph->isAtYEnd());1428 QVERIFY(!lvwph->isAtYEnd());
1429 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1429 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1430 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));1430 QCOMPARE(section(lvwph->m_topSectionItem), QString("Bold"));
1431 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);1431 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1432 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1432 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1433 }1433 }
14341434
@@ -1452,7 +1452,7 @@
1452 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1452 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1453 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1453 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1454 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));1454 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
1455 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);1455 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[2]->m_item);
1456 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1456 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
14571457
1458 model->setProperty(1, "size", 100);1458 model->setProperty(1, "size", 100);
@@ -1473,7 +1473,7 @@
1473 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1473 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1474 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1474 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1475 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));1475 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
1476 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);1476 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[2]->m_item);
1477 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1477 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1478 }1478 }
14791479
@@ -1512,7 +1512,7 @@
1512 QCOMPARE(lvwph->m_headerItemShownHeight, 50.);1512 QCOMPARE(lvwph->m_headerItemShownHeight, 50.);
1513 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1513 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1514 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));1514 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));
1515 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 0);1515 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
1516 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1516 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
15171517
1518 scrollToTop();1518 scrollToTop();
@@ -1551,7 +1551,7 @@
1551 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1551 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1552 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1552 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1553 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));1553 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
1554 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);1554 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1555 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1555 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
15561556
1557 lvwph->showHeader();1557 lvwph->showHeader();
@@ -1572,7 +1572,7 @@
1572 QCOMPARE(lvwph->m_headerItemShownHeight, 50.);1572 QCOMPARE(lvwph->m_headerItemShownHeight, 50.);
1573 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1573 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1574 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));1574 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
1575 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);1575 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1576 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1576 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
15771577
1578 scrollToTop();1578 scrollToTop();
@@ -1759,7 +1759,7 @@
1759 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1759 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1760 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1760 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1761 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));1761 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));
1762 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 0);1762 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1763 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1763 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1764 }1764 }
17651765
@@ -1784,7 +1784,7 @@
1784 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1784 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1785 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1785 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1786 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));1786 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
1787 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);1787 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1788 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1788 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1789 }1789 }
17901790
@@ -1892,7 +1892,7 @@
1892 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1892 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1893 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1893 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1894 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));1894 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
1895 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);1895 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
1896 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1896 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1897 }1897 }
18981898
@@ -1914,7 +1914,7 @@
1914 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1914 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1915 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1915 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1916 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));1916 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
1917 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);1917 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
1918 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1918 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
19191919
1920 bool res = lvwph->maximizeVisibleArea(1);1920 bool res = lvwph->maximizeVisibleArea(1);
@@ -1934,7 +1934,7 @@
1934 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1934 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1935 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1935 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1936 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));1936 QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
1937 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);1937 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
1938 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1938 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1939 }1939 }
19401940
@@ -1987,7 +1987,7 @@
1987 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);1987 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1988 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);1988 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1989 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));1989 QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
1990 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);1990 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[1]->m_item);
1991 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);1991 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1992 }1992 }
19931993
@@ -2014,7 +2014,7 @@
2014 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);2014 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
2015 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);2015 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
2016 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));2016 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));
2017 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 0);2017 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
2018 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);2018 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
20192019
2020 changeContentY(20);2020 changeContentY(20);
@@ -2037,7 +2037,7 @@
2037 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);2037 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
2038 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);2038 QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
2039 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));2039 QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));
2040 QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 0);2040 QCOMPARE(sectionDelegate(lvwph->m_topSectionItem), lvwph->m_visibleItems[0]->m_item);
2041 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);2041 QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
2042 }2042 }
20432043

Subscribers

People subscribed via source and target branches