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 6a4afebc5ce8db69a6c9fb398cada31e6bad5e3c 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.6 Change-Id: Icb8384b56a4727c8c5050a1d501aebb55f48aafe Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit a86321cb665b1af03b245b3b0fe0b57faa4a678f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%