Fix test failing on Xenial (Qt 5.5)
This is the simplest of the ways of fixing the problem i found.
The issue is that flickable code doesn't play very well with the situation in which you have a contentHeight smaller than height
and you reimplement minYExtent but not maxYExtent and minYExtent is returning a negative value.
The other solutions involve implementing maxYExtent figuring out why minYExtent ends up being negative on Qt 5.5 and not in Qt 5.4
The first seemed too much work
The second is most probably ok since it's just different order invokations lead to different minyExtent+friends combinations that basically
represent the same thing
So I ended up making sure the minYExtent is never negative (because it's 0) if the contentHeight is smaller than the height of the list
commit0b55f8f075726d8b90f243f40e4c0b98538336de
authorAlbert Astals Cid <albert.astals@canonical.com>
dateMon 4 Jan 2016, 15:27 (11 years ago)
parent545b964
plugins/Dash/listviewwithpageheader.cpp+1−1
@@ -1177,7 +1177,7 @@ void ListViewWithPageHeader::headerHeightChanged(qreal newHeaderHeight, qreal ol
11771177
11781178void ListViewWithPageHeader::adjustMinYExtent()
11791179{
1180− if (m_visibleItems.isEmpty()) {
1180+ if (m_visibleItems.isEmpty() || contentHeight() < height()) {
11811181 m_minYExtent = 0;
11821182 } else {
11831183 qreal nonCreatedHeight = 0;