Commit 17b4cf5e authored by Frederik Gladhorn's avatar Frederik Gladhorn Committed by The Qt Project
Browse files

Accessibility: Fix crash when accessing accessible children.


The window would create new child interfaces every time
it's children are queried. Instead properly use the
crash.

Task-number: QTBUG-31417
Change-Id: Ifc7bbdbdb9a506fe04a348fba643f1d52a6157e7
Reviewed-by: default avatarJan Arve Sæther <jan-arve.saether@digia.com>
parent 43484528
No related merge requests found
Showing with 2 additions and 4 deletions
......@@ -81,10 +81,8 @@ QAccessibleInterface *QAccessibleQuickWindow::parent() const
QAccessibleInterface *QAccessibleQuickWindow::child(int index) const
{
if (index == 0) {
if (QQuickItem *declarativeRoot = rootItem())
return new QAccessibleQuickItem(declarativeRoot);
}
if (index == 0)
return QAccessible::queryAccessibleInterface(rootItem());
return 0;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment