diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-07-20 09:40:48 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-07-20 10:57:23 (GMT) |
commit | 64b9e63f4f9162c1af299b1355e84b0e616ad768 (patch) | |
tree | 37cdec0bb32b867b09b1c30617f1132ea6f98298 | |
parent | 910b8fe6222011b8f94259f165bcf4d4002172c0 (diff) | |
download | Qt-64b9e63f4f9162c1af299b1355e84b0e616ad768.zip Qt-64b9e63f4f9162c1af299b1355e84b0e616ad768.tar.gz Qt-64b9e63f4f9162c1af299b1355e84b0e616ad768.tar.bz2 |
Do not crash due to a infinite recursion when using voiceover on MacOS
The reason for the infinite recursion was that
QAccessibleTitleBar::object() returned the titlebar's dockwidget.
This could lead to a problem when the AT client tried to
traverse the accessibility hierarchy:
As a response to QAXChildrenAttribute (retrieve children) on a dock
widget node, it would register it's children in the
hierarchy manager. In this case, the object registered for the titlebar
interface was the QDockWidget.
In order to do further traversal, the bridge could call
queryAccessibleInterface on the list of retrieved children to get the
QAccessibleInterface for those objects, however, that would return the
QAccessibleDockWidget interface that we just had traversed,....
Task-number: QTBUG-6843
Reviewed-by: Carlos Manuel Duclos Vergara
-rw-r--r-- | src/plugins/accessible/widgets/qaccessiblewidgets.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp index 499eb1d..662663d 100644 --- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp +++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp @@ -984,7 +984,7 @@ int QAccessibleDockWidget::childCount() const int QAccessibleDockWidget::indexOfChild(const QAccessibleInterface *child) const { if (child) { - if (qobject_cast<QDockWidget *>(child->object()) == dockWidget() && child->role(0) == TitleBar) { + if (child->role(0) == TitleBar) { return 1; } else { return 2; //### @@ -1214,7 +1214,7 @@ int QAccessibleTitleBar::childAt(int x, int y) const QObject *QAccessibleTitleBar::object() const { - return m_dockWidget; + return 0; } QDockWidgetLayout *QAccessibleTitleBar::dockWidgetLayout() const |