Remove all references to QAccessible::Self
navigate() to Self does not make any sense (its basically a clone). It seems that its not that useful to return Self from relationTo(), since it was only one place where relationTo() was called where it checked for the Self flag. This was in the windows bridge, and we could easily work around that. If it really turns out that Self is useful, we can always add that enum value back later. Change-Id: I9ebb60da059a843de5e6fcab9e815b919afc6f2a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
This commit is contained in:
parent
f4d2acdb8e
commit
ec550e28d2
@ -306,7 +306,6 @@ public:
|
||||
|
||||
enum RelationFlag {
|
||||
Unrelated = 0x00000000,
|
||||
Self = 0x00000001,
|
||||
FocusChild = 0x00010000,
|
||||
Label = 0x00020000,
|
||||
Labelled = 0x00040000,
|
||||
|
@ -231,10 +231,6 @@ QAccessible::Relation QAccessibleApplication::relationTo(const QAccessibleInterf
|
||||
if (!o)
|
||||
return QAccessible::Unrelated;
|
||||
|
||||
if(o == object()) {
|
||||
return QAccessible::Self;
|
||||
}
|
||||
|
||||
return QAccessible::Unrelated;
|
||||
}
|
||||
|
||||
|
@ -694,7 +694,7 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::accNavigate(long navDir, VARIANT v
|
||||
case NAVDIR_LEFT:
|
||||
case NAVDIR_RIGHT:
|
||||
if (QAccessibleInterface *pIface = accessible->parent()) {
|
||||
|
||||
const int indexOfOurself = pIface->indexOfChild(accessible);
|
||||
QRect startg = accessible->rect();
|
||||
QPoint startc = startg.center();
|
||||
QAccessibleInterface *candidate = 0;
|
||||
@ -704,7 +704,7 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::accNavigate(long navDir, VARIANT v
|
||||
QAccessibleInterface *sibling = 0;
|
||||
sibling = pIface->child(i);
|
||||
Q_ASSERT(sibling);
|
||||
if ((accessible->relationTo(sibling) & QAccessible::Self) || sibling->state().invisible) {
|
||||
if (i == indexOfOurself || sibling->state().invisible) {
|
||||
//ignore ourself and invisible siblings
|
||||
delete sibling;
|
||||
continue;
|
||||
|
@ -361,9 +361,6 @@ QAccessible::Relation QAccessibleWidget::relationTo(const QAccessibleInterface *
|
||||
if (inverse & QAccessible::Label)
|
||||
relation |= QAccessible::Labelled;
|
||||
|
||||
if(o == object())
|
||||
relation |= QAccessible::Self;
|
||||
|
||||
return relation;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user