-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QTreeView: fix performance regression from accessibility updates
When expanding items in a tree view, the model as seen by accessibility changes size and structure, and needs to be reset. This was done in 6a4afeb by emitting a ModelReset update at the end of QTreeViewPrivate::layout when laying out the items had changed the number of visible items. However, QTreeViewPrivate::layout is called both recursively, and in a loop when expanding all items, or expanding items to a certain depth, resulting in a heavy performance hit when each recursion or iteration causes the accessibility bridge to rebuild its representation from scratch. Instead, we now only store a flag that the model has to be reset in QTreeViewPrivate::layout, and then trigger the reset in the function that call layout, after the laying out is complete. Fixes: QTBUG-122054 Pick-to: 6.7 6.6 Change-Id: Icb8384b56a4727c8c5050a1d501aebb55f48aafe Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
- Loading branch information
Showing
2 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters