diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2019-04-24 11:46:37 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2019-04-29 10:27:36 +0000 |
commit | 8fb8cfd040a5fa8c4caa5715efe1328da9c49536 (patch) | |
tree | 808c3d874ff5e5d4b6442fd1f0cae661ea585a8f /src/quick/items/qquicktableview_p_p.h | |
parent | 9e5ca92712da3392d1f2957dc1e546cdddd1ce0a (diff) |
QQuickTableView: avoid building syncView children before syncView has finished
If you put two tables inside an async loader, with one being
the syncView for the other, the syncView child will start
loading items async simultaneously with the syncView.
This is unnecessary, and steals loading resources, since
the child will have to rebuild anyway once the syncView has
completed loading. So return early from the recursiveUpdateTable
call before handling the children if we detect that the parent
is not done.
Change-Id: I8c0badaf3cfa3a353a650e5f38f381bf9a7b98f9
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.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquicktableview_p_p.h b/src/quick/items/qquicktableview_p_p.h index ab7c0c3275..728896d30e 100644 --- a/src/quick/items/qquicktableview_p_p.h +++ b/src/quick/items/qquicktableview_p_p.h @@ -315,7 +315,7 @@ public: QQuickTableView *rootSyncView() const; bool updateTableRecursive(); - void updateTable(); + bool updateTable(); void relayoutTable(); void relayoutTableItems(); |