52c2b82082
Since macOS requires us to return an array with elements as the children of a table's row. And it might ask for the children of many rows. This is very costly, and results in a lot of QAccessibleInterface instances being created unnecessary. Instead, use unassociated QMacAccessibleElements as place holders for cells, and place them in the column array of the QMacAccessibleElement that represents the respective row. Those placeholder elements have the synthesizedRole set to AXCell, and have the same axid as the table, for as long as there is no corresponding QAccessibleTableCell created. Until that point, they are in practice "managedByParent" just as the row and column elements. Since the place holder object knows about its column, row, and table, it can respond to many inquiries directly without needing to create the interface. Once the QAccessibleInterface for the cell is required for an already existing place holder, then we need to promote the place holder to an independent element. We reset the synthesizedRole to nil, and change the axid to the ID of the cell interface. However, the cell interface might have been created and assocated with an element before the placeholders were created when navigating through the children of a row. So when we create an element for a table cell, then we need to make sure that the table elements' corresponding row is also populated, with the new element in the right place. Pick-to: 6.5 Fixes: QTBUG-34337 Change-Id: Iff78e3b8335df8cf294fffb6579605bfeb8409ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
conanfile.py | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake | ||
sync.profile |