@@ -39,7 +39,7 @@ private:
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);
@@ -116,9 +116,9 @@ private:
116 return item ? item->property("text").toString() : QString();
116 return item ? item->property("text").toString() : QString();
119− int sectionDelegateIndex(QQuickItem *item) const
119+ QQuickItem *sectionDelegate(QQuickItem *item) const
121− return item ? item->property("delegateIndex").toInt() : -1;
121+ return item ? item->property("delegate").value<QQuickItem *>() : nullptr;
124private Q_SLOTS:
124private Q_SLOTS:
@@ -220,7 +220,7 @@ private Q_SLOTS:
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.);
@@ -242,7 +242,7 @@ private Q_SLOTS:
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.);
@@ -264,7 +264,7 @@ private Q_SLOTS:
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.);
270 changeContentY(-30);
270 changeContentY(-30);
@@ -283,7 +283,7 @@ private Q_SLOTS:
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.);
@@ -339,7 +339,7 @@ private Q_SLOTS:
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.);
345 lvwph->positionAtBeginning();
345 lvwph->positionAtBeginning();
@@ -365,7 +365,7 @@ private Q_SLOTS:
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.);
371 lvwph->positionAtBeginning();
371 lvwph->positionAtBeginning();
@@ -410,7 +410,7 @@ private Q_SLOTS:
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.);
416 model->setProperty(0, "size", 400);
416 model->setProperty(0, "size", 400);
@@ -430,7 +430,7 @@ private Q_SLOTS:
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.);
436 scrollToTop();
436 scrollToTop();
@@ -484,7 +484,7 @@ private Q_SLOTS:
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.);
490 model->setProperty(0, "size", 400);
490 model->setProperty(0, "size", 400);
@@ -504,7 +504,7 @@ private Q_SLOTS:
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.);
510 scrollToTop();
510 scrollToTop();
@@ -541,7 +541,7 @@ private Q_SLOTS:
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.);
547 changeContentY(-30);
547 changeContentY(-30);
@@ -559,7 +559,7 @@ private Q_SLOTS:
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.);
565 changeContentY(30);
565 changeContentY(30);
@@ -577,7 +577,7 @@ private Q_SLOTS:
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.);
583 changeContentY(-30);
583 changeContentY(-30);
@@ -595,7 +595,7 @@ private Q_SLOTS:
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.);
@@ -616,7 +616,7 @@ private Q_SLOTS:
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.);
622 lvwph->setDelegate(otherDelegate);
622 lvwph->setDelegate(otherDelegate);
@@ -675,7 +675,7 @@ private Q_SLOTS:
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.);
681 scrollToTop();
681 scrollToTop();
@@ -714,7 +714,7 @@ private Q_SLOTS:
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.);
720 scrollToTop();
720 scrollToTop();
@@ -751,7 +751,7 @@ private Q_SLOTS:
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.);
@@ -836,7 +836,7 @@ private Q_SLOTS:
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.);
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 @@ private Q_SLOTS:
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.);
863 scrollToTop();
863 scrollToTop();
@@ -898,7 +898,7 @@ private Q_SLOTS:
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.);
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 @@ private Q_SLOTS:
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.);
@@ -942,7 +942,7 @@ private Q_SLOTS:
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.);
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 @@ private Q_SLOTS:
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.);
@@ -986,7 +986,7 @@ private Q_SLOTS:
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.);
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 @@ private Q_SLOTS:
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.);
1013 scrollToTop();
1013 scrollToTop();
@@ -1055,7 +1055,7 @@ private Q_SLOTS:
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.);
1061 scrollToBottom();
1061 scrollToBottom();
@@ -1076,7 +1076,7 @@ private Q_SLOTS:
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.);
@@ -1130,7 +1130,7 @@ private Q_SLOTS:
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.);
1136 changeContentY(-1700);
1136 changeContentY(-1700);
@@ -1155,7 +1155,7 @@ private Q_SLOTS:
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.);
@@ -1217,7 +1217,7 @@ private Q_SLOTS:
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.);
@@ -1241,7 +1241,7 @@ private Q_SLOTS:
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.);
@@ -1264,7 +1264,7 @@ private Q_SLOTS:
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.);
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 @@ private Q_SLOTS:
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.);
@@ -1307,7 +1307,7 @@ private Q_SLOTS:
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.);
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 @@ private Q_SLOTS:
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.);
@@ -1407,7 +1407,7 @@ private Q_SLOTS:
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.);
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 @@ private Q_SLOTS:
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.);
@@ -1452,7 +1452,7 @@ private Q_SLOTS:
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.);
1458 model->setProperty(1, "size", 100);
1458 model->setProperty(1, "size", 100);
@@ -1473,7 +1473,7 @@ private Q_SLOTS:
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.);
@@ -1512,7 +1512,7 @@ private Q_SLOTS:
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.);
1518 scrollToTop();
1518 scrollToTop();
@@ -1551,7 +1551,7 @@ private Q_SLOTS:
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.);
1557 lvwph->showHeader();
1557 lvwph->showHeader();
@@ -1572,7 +1572,7 @@ private Q_SLOTS:
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.);
1578 scrollToTop();
1578 scrollToTop();
@@ -1759,7 +1759,7 @@ private Q_SLOTS:
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.);
@@ -1784,7 +1784,7 @@ private Q_SLOTS:
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.);
@@ -1892,7 +1892,7 @@ private Q_SLOTS:
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.);
@@ -1914,7 +1914,7 @@ private Q_SLOTS:
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.);
1920 bool res = lvwph->maximizeVisibleArea(1);
1920 bool res = lvwph->maximizeVisibleArea(1);
@@ -1934,7 +1934,7 @@ private Q_SLOTS:
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.);
@@ -1987,7 +1987,7 @@ private Q_SLOTS:
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.);
@@ -2014,7 +2014,7 @@ private Q_SLOTS:
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.);
2020 changeContentY(20);
2020 changeContentY(20);
@@ -2037,7 +2037,7 @@ private Q_SLOTS:
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.);