summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJan-Arve Saether <jan-arve.saether@nokia.com>2012-02-09 11:20:34 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-10 15:21:46 +0100
commitff2886db6a3308c1f4ee0879af497a5d43c33133 (patch)
tree50bfc43dbcb2bb34898e7723519abde2181d0347 /src/gui
parent482d96a0c5d523ace63f56bda6851926b4469dd0 (diff)
Move all usages of Relation enum values to QAccessible::relations()
Next step is to remove navigate(), but that has to be done in qtdeclarative first. Change-Id: I01ea1386c092446be04cc19d0f70adf53f094adc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/accessible/qaccessible.cpp6
-rw-r--r--src/gui/accessible/qaccessible.h5
2 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index dd0468d9f9..6664e5d312 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -894,17 +894,19 @@ QAccessibleInterface *QAccessibleEvent::accessibleInterface() const
*/
QAccessible::Relation QAccessibleInterface::relationTo(const QAccessibleInterface *) const
{
- return QAccessible::Unrelated;
+ return QAccessible::Relation();
}
/*!
Returns the meaningful relations to other widgets. Usually this will not return parent/child
relations, unless they are handled in a specific way such as in tree views.
It will typically return the labelled-by and label relations.
+ It should never return itself.
\sa relationTo(), navigate()
*/
-QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > QAccessibleInterface::relations() const
+QVector<QPair<QAccessibleInterface*, QAccessible::Relation> >
+QAccessibleInterface::relations(QAccessible::Relation /*match = QAccessible::AllRelations*/) const
{
return QVector<QPair<QAccessibleInterface*, QAccessible::Relation> >();
}
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 214ec20f9c..9fc13a827b 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -306,12 +306,11 @@ public:
};
enum RelationFlag {
- Unrelated = 0x00000000,
Label = 0x00020000,
Labelled = 0x00040000,
Controller = 0x00080000,
Controlled = 0x00100000,
- LogicalMask = 0x00ff0000
+ AllRelations = 0xffffffff
};
Q_DECLARE_FLAGS(Relation, RelationFlag)
@@ -380,7 +379,7 @@ public:
// relations
virtual QAccessible::Relation relationTo(const QAccessibleInterface *other) const;
- virtual QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > relations() const;
+ virtual QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > relations(QAccessible::Relation match = QAccessible::AllRelations) const;
virtual QAccessibleInterface *focusChild() const;
virtual QAccessibleInterface *childAt(int x, int y) const = 0;