From 9a5ab30d52257f88931d6d09a376b4d75da69c5a Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 18 Jan 2013 17:59:52 +0100 Subject: Improve QAccessibleApplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add more testing. This uncovers that currently the QDesktopScreenWidget shows up as child of the app. Fixed by not creating QAccessibleInterfaces for QDesktopScreenWidget. Also don't crash in indexOfChild when called with 0. Change-Id: I9fb1e47e8f1f33189e6125f56f274a7b94ecd0dd Reviewed-by: Jan Arve Sæther --- src/gui/accessible/qaccessibleobject.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui') diff --git a/src/gui/accessible/qaccessibleobject.cpp b/src/gui/accessible/qaccessibleobject.cpp index bbdbb9ee68..c1ef71e1fa 100644 --- a/src/gui/accessible/qaccessibleobject.cpp +++ b/src/gui/accessible/qaccessibleobject.cpp @@ -193,6 +193,8 @@ int QAccessibleApplication::childCount() const /*! \reimp */ int QAccessibleApplication::indexOfChild(const QAccessibleInterface *child) const { + if (!child) + return -1; const QObjectList tlw(topLevelObjects()); return tlw.indexOf(child->object()); } -- cgit v1.2.3