diff options
author | Volker Hilsheimer <[email protected]> | 2024-02-09 15:00:48 +0100 |
---|---|---|
committer | Volker Hilsheimer <[email protected]> | 2024-02-09 23:16:39 +0100 |
commit | a86321cb665b1af03b245b3b0fe0b57faa4a678f (patch) | |
tree | 7870b370e6c00d2bea090a468610997870f3e96f /src/sql/kernel/qsqldatabase.cpp | |
parent | 16c27a83f0c9c6f53578dd56024719a709cafcb0 (diff) |
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
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.7 6.6
Change-Id: Icb8384b56a4727c8c5050a1d501aebb55f48aafe
Reviewed-by: Oliver Eftevaag <[email protected]>
Reviewed-by: Tor Arne Vestbø <[email protected]>
Diffstat (limited to 'src/sql/kernel/qsqldatabase.cpp')
0 files changed, 0 insertions, 0 deletions