Accessibility: Do not assert when a widget doesn't have a QAI
[ChangeLog][QtGui] Fixed crash when sending accessibility updates when the corresponding widget does not have a corresponding QAccessibleInterface. This showed on Mac for example with QStatusBar. Task-number: QTBUG-35421 Change-Id: I94174e98e858b7a0122532ee5fcc8458a263bccd Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
parent
631c3dbc80
commit
97c1b2d32e
@ -1313,6 +1313,8 @@ QAccessible::Id QAccessibleEvent::uniqueId() const
|
|||||||
if (!m_object)
|
if (!m_object)
|
||||||
return m_uniqueId;
|
return m_uniqueId;
|
||||||
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object);
|
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object);
|
||||||
|
if (!iface)
|
||||||
|
return 0;
|
||||||
if (m_child != -1)
|
if (m_child != -1)
|
||||||
iface = iface->child(m_child);
|
iface = iface->child(m_child);
|
||||||
return QAccessible::uniqueId(iface);
|
return QAccessible::uniqueId(iface);
|
||||||
|
Loading…
Reference in New Issue
Block a user