diff options
Diffstat (limited to 'src/gui/accessible')
-rw-r--r-- | src/gui/accessible/qaccessible.cpp | 5 | ||||
-rw-r--r-- | src/gui/accessible/qaccessibleobject.cpp | 5 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 2831f24ac8..41382c48b3 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -799,9 +799,8 @@ void QAccessible::updateAccessibility(QObject *object, int child, Event reason) /*! \fn int QAccessibleInterface::indexOfChild(const QAccessibleInterface *child) const - Returns the 1-based index of the object \a child in this object's - children list, or -1 if \a child is not a child of this object. 0 - is not a possible return value. + Returns the 0-based index of the object \a child in this object's + children list, or -1 if \a child is not a child of this object. All objects provide this information about their children. diff --git a/src/gui/accessible/qaccessibleobject.cpp b/src/gui/accessible/qaccessibleobject.cpp index cde375aaa5..e271df2a13 100644 --- a/src/gui/accessible/qaccessibleobject.cpp +++ b/src/gui/accessible/qaccessibleobject.cpp @@ -221,10 +221,7 @@ int QAccessibleApplication::childCount() const int QAccessibleApplication::indexOfChild(const QAccessibleInterface *child) const { const QObjectList tlw(topLevelObjects()); - int index = tlw.indexOf(child->object()); - if (index != -1) - ++index; - return index; + return tlw.indexOf(child->object()); } /*! \reimp */ |