diff options
| author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-04-08 14:16:12 +0200 |
|---|---|---|
| committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-04-11 23:33:52 +0200 |
| commit | 52c2b82082b535123c0eecafe1ec1e4e4190df2a (patch) | |
| tree | 0a450b673d3d8c57b68b63c7a984e4e55b1007fa /src/plugins/sqldrivers/mysql/qsql_mysql.cpp | |
| parent | 69a8d1293ad69faaef120f1e46ab46fd8cd70318 (diff) | |
macOS Accessibility: Delay creation of table cell interfaces
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>
Diffstat (limited to 'src/plugins/sqldrivers/mysql/qsql_mysql.cpp')
0 files changed, 0 insertions, 0 deletions
