qtdeclarative-5.14.2-QQuickItemView-fix-maxXY-extent.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From cc5387ad22ca503d167fd66e2429107d45b937af Mon Sep 17 00:00:00 2001
  2. From: David Redondo <qt@david-redondo.de>
  3. Date: Wed, 13 May 2020 11:04:23 +0200
  4. Subject: [PATCH] QQuickItemView: Fix max(X/Y)Extent()
  5. QQuickFlickable maxXExtent() and maxYExtent() return the amount of space
  6. that is not shown when inside a ScrollView. QQuickItemView however just
  7. returned width() if vertical and height() if horizontal. In these cases
  8. just defer to the QQuickFlickable base implementation like minXExtent()
  9. and minYExtent() already do.
  10. Fixes: QTBUG-83890
  11. Pick-to: 5.15
  12. Change-Id: I7f4060c2f46ae07611bedceca0d322c5f7f6affb
  13. ---
  14. src/quick/items/qquickitemview.cpp | 4 ++--
  15. 1 file changed, 2 insertions(+), 2 deletions(-)
  16. diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp
  17. index 7fb392233e4..ab130ac6857 100644
  18. --- a/src/quick/items/qquickitemview.cpp
  19. +++ b/src/quick/items/qquickitemview.cpp
  20. @@ -1393,7 +1393,7 @@ qreal QQuickItemView::maxYExtent() const
  21. {
  22. Q_D(const QQuickItemView);
  23. if (d->layoutOrientation() == Qt::Horizontal)
  24. - return height();
  25. + return QQuickFlickable::maxYExtent();
  26. if (d->vData.maxExtentDirty) {
  27. d->maxExtent = d->maxExtentForAxis(d->vData, false);
  28. @@ -1421,7 +1421,7 @@ qreal QQuickItemView::maxXExtent() const
  29. {
  30. Q_D(const QQuickItemView);
  31. if (d->layoutOrientation() == Qt::Vertical)
  32. - return width();
  33. + return QQuickFlickable::maxXExtent();
  34. if (d->hData.maxExtentDirty) {
  35. d->maxExtent = d->maxExtentForAxis(d->hData, true);
  36. --
  37. 2.16.3