@@ -1887,6 +1887,26 @@ private Q_SLOTS:
18871887 QTRY_COMPARE(lvwph->m_visibleItems.count(), 1);
18881888 }
18891889
1890+ void testResizeScrolledBigItem()
1891+ {
1892+ QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 0), Q_ARG(QVariant, 6));
1893+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 0);
1894+
1895+ QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 0), Q_ARG(QVariant, 10000));
1896+ changeContentY(8000);
1897+
1898+ // Pretend the list is busy requesting some other index
1899+ lvwph->m_asyncRequestedIndex = 4;
1900+
1901+ lvwph->m_visibleItems[0]->m_item->setHeight(100);
1902+ // This resize makes the item go outside the viewport so its deleted
1903+ QCOMPARE(lvwph->m_visibleItems.count(), 0);
1904+ QCOMPARE(lvwph->m_firstVisibleIndex, -1);
1905+ // On the next polish the item will be readded
1906+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 1);
1907+ QTRY_COMPARE(lvwph->m_firstVisibleIndex, 0);
1908+ }
1909+
18901910private:
18911911 QQuickView *view;
18921912 ListViewWithPageHeader *lvwph;