summaryrefslogtreecommitdiffstats
path: root/src/widgets/accessible
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-07-08 15:16:12 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2023-07-10 11:34:41 +0200
commit6ec35ff8c56222a317b838b6aac390eb6974de85 (patch)
tree64074b94cf024fd12c48b57a0cb8e7d88874e422 /src/widgets/accessible
parent60f706063aebee22f7fc1bb80f0003afb50fe73e (diff)
a11y: Report app as parent for top-level item views
As happens for other widgets (s. QAccessibleWidget::parentObject), report the app as accessible parent for item views that don't have another parent set. Otherwise, the accessible tree is broken when there's a top-level item view: The application has the item view as a child, but the child does not have any parent set. Extend a QListView autotest accordingly. Fixes: QTBUG-115135 Pick-to: 6.6 6.5 Change-Id: Ie06874681180a30fc6248dc98f80c4158d837278 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/accessible')
-rw-r--r--src/widgets/accessible/itemviews.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/accessible/itemviews.cpp b/src/widgets/accessible/itemviews.cpp
index ae1de6cab4..e640194a2e 100644
--- a/src/widgets/accessible/itemviews.cpp
+++ b/src/widgets/accessible/itemviews.cpp
@@ -557,7 +557,7 @@ QAccessibleInterface *QAccessibleTable::parent() const
}
return QAccessible::queryAccessibleInterface(view()->parent());
}
- return nullptr;
+ return QAccessible::queryAccessibleInterface(qApp);
}
QAccessibleInterface *QAccessibleTable::child(int logicalIndex) const