Use QObject pointer as QCocoaAccessibleElement id.
authorMorten Johan Sorvig <morten.sorvig@nokia.com>
Thu, 19 Jan 2012 06:49:48 +0000 (07:49 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 23 Jan 2012 13:47:10 +0000 (14:47 +0100)
commit95ea9cb1914b7307e1d832c7813f944f12e463b5
tree5936ebb04a31ffece250b5a57cb3614e5561f7e2
parent7ed6a247bfcf314b4a7bc8332b813b3e92997e41
Use QObject pointer as QCocoaAccessibleElement id.

Each QCocoaAccessibleElement needs to provide a
unique stable id through the -(NSUnterger)hash
method.

The previous approach of basing the hash on the parent
hash plus the child index is unpractical now that
childAt() can return distant descendants instead
of immediate children only. Use the QObject pointer,
which is set for all accessible interfaces today.

Change-Id: I5868e3a81c1b4da7233504f30003ab8060e9fa3f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
src/plugins/platforms/cocoa/qnsviewaccessibility.mm