aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktableview_p_p.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-10-19 23:25:22 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-10-23 13:43:56 +0200
commitb5501e9043cabcbf74d3d53b424ece5deb706a27 (patch)
tree78e27fa54ea44fff774d4d458f3b897247f46c1c /src/quick/items/qquicktableview_p_p.h
parent8528bd527f91f4717ec502f311e34aa5acbc946e (diff)
TableView: ensure we rebuild the sync view, even when flicking on a sync view child
When two table views are connect through the syncView property, both views will flick when you flick on either of them. This also means that if you fast-flick more than a page on the sync view child, the sync view needs to rebuild, like if you did the fast-flick directly on the sync view. Because we updated the sync view's viewportRect too soon while fast-flicking on the the sync child, we didn't detect that it was a fast-flick, and that a rebuild was needed. The result is that you could sometimes end up with the views getting out-of-sync. This patch will allow TableView to only move the viewport without updating the internal viewportRect while flicking. The viewportRect will instead be sync-ed at a later point, like we do when you flick on the sync view directly. This will ensure that we rebuild if needed, also while fast-flicking on the child view. Task-number: QTBUG-87821 Pick-to: 5.15 Change-Id: Ifc74473eb43406acaa8e24880066fb4ca89d3a4e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/items/qquicktableview_p_p.h')
-rw-r--r--src/quick/items/qquicktableview_p_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquicktableview_p_p.h b/src/quick/items/qquicktableview_p_p.h
index 6a8c5fa7fa..ef408be668 100644
--- a/src/quick/items/qquicktableview_p_p.h
+++ b/src/quick/items/qquicktableview_p_p.h
@@ -454,6 +454,7 @@ public:
void scheduleRebuildIfFastFlick();
void setLocalViewportX(qreal contentX);
void setLocalViewportY(qreal contentY);
+ void syncViewportRect();
void syncViewportPosRecursive();
void fetchMoreData();