Accessibility: Warn if an event cannot create an interface for some reason.

Change-Id: I87d0290286243f8ead114e238798c9a7b882d978
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
Frederik Gladhorn 2012-11-04 10:32:27 +01:00 committed by The Qt Project
parent 33ffbf21e0
commit 0dc2b5e083

View File

@ -1070,8 +1070,10 @@ QColor QAccessibleInterface::backgroundColor() const
QAccessibleInterface *QAccessibleEvent::accessibleInterface() const
{
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object);
if (!iface)
if (!iface) {
qWarning() << "Cannot create accessible interface for object: " << m_object;
return 0;
}
if (m_child >= 0) {
QAccessibleInterface *child = iface->child(m_child);