summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-01-18 17:59:52 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-25 11:58:23 +0100
commit9a5ab30d52257f88931d6d09a376b4d75da69c5a (patch)
tree3e6e0e8948ec921faa61ca138a7088a2a7d7def7 /src/gui
parent48c73540ad2a507963db0fba57484faf66462ad7 (diff)
Improve QAccessibleApplication
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 <jan-arve.saether@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/accessible/qaccessibleobject.cpp2
1 files changed, 2 insertions, 0 deletions
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());
}