Make sure that QAccessibleWindowContainer::childCount is valid
When embedding foreign windows, we won't be able to return a valid child accessible interface, so do not report it at all. Supporting foreign windows properly is platform specific and something to consider, but at least we shouldn't crash. Task-number: QTBUG-63451 Change-Id: I19350cf97dc8d0c3f3052411eba0eee5f750dbab Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>bb10
parent
5eb508a317
commit
7a26582807
|
|
@ -953,7 +953,7 @@ QAccessibleWindowContainer::QAccessibleWindowContainer(QWidget *w)
|
|||
|
||||
int QAccessibleWindowContainer::childCount() const
|
||||
{
|
||||
if (container()->containedWindow())
|
||||
if (container()->containedWindow() && QAccessible::queryAccessibleInterface(container()->containedWindow()))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue