From 56c80382c683a9dc16a5d426bf5a93b0ee1a4d15 Mon Sep 17 00:00:00 2001 From: Jan-Arve Saether Date: Mon, 16 Jan 2012 13:51:20 +0100 Subject: [PATCH] Remove all reimplementations of relationTo() returning Unrelated. QAccessibleInterface::relationTo() already return QAccessible::Unrelated by default. No need to duplicate that code. Change-Id: I40e6758b946c43ca8773cdb2d28407edf99aad49 Reviewed-by: Frederik Gladhorn --- src/plugins/accessible/widgets/itemviews.cpp | 15 --------------- src/plugins/accessible/widgets/itemviews.h | 9 --------- src/plugins/accessible/widgets/qaccessiblewidgets.cpp | 5 ----- src/plugins/accessible/widgets/qaccessiblewidgets.h | 1 - 4 files changed, 30 deletions(-) diff --git a/src/plugins/accessible/widgets/itemviews.cpp b/src/plugins/accessible/widgets/itemviews.cpp index df77137..a7989cc 100644 --- a/src/plugins/accessible/widgets/itemviews.cpp +++ b/src/plugins/accessible/widgets/itemviews.cpp @@ -450,11 +450,6 @@ int QAccessibleTable::navigate(QAccessible::RelationFlag relation, int index, QA return -1; } -QAccessible::Relation QAccessibleTable::relationTo(const QAccessibleInterface *) const -{ - return QAccessible::Unrelated; -} - void *QAccessibleTable::interface_cast(QAccessible::InterfaceType t) { if (t == QAccessible::TableInterface) @@ -559,11 +554,6 @@ int QAccessibleTree::indexOfChild(const QAccessibleInterface *iface) const return -1; } -QAccessible::Relation QAccessibleTree::relationTo(const QAccessibleInterface *) const -{ - return QAccessible::Unrelated; -} - QAccessibleInterface *QAccessibleTree::cellAt(int row, int column) const { QModelIndex index = indexFromLogical(row, column); @@ -924,11 +914,6 @@ int QAccessibleTableHeaderCell::navigate(QAccessible::RelationFlag relation, int return -1; } -QAccessible::Relation QAccessibleTableHeaderCell::relationTo(const QAccessibleInterface *) const -{ - return QAccessible::Unrelated; -} - #endif // QT_NO_ITEMVIEWS QT_END_NAMESPACE diff --git a/src/plugins/accessible/widgets/itemviews.h b/src/plugins/accessible/widgets/itemviews.h index c30ef17..4b51123 100644 --- a/src/plugins/accessible/widgets/itemviews.h +++ b/src/plugins/accessible/widgets/itemviews.h @@ -78,7 +78,6 @@ public: QAccessibleInterface *parent() const; QAccessibleInterface *child(int index) const; int navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const; - QAccessible::Relation relationTo(const QAccessibleInterface *other) const; void *interface_cast(QAccessible::InterfaceType t); @@ -160,8 +159,6 @@ public: int rowCount() const; - QAccessible::Relation relationTo(const QAccessibleInterface *other) const; - // table interface QAccessibleInterface *cellAt(int row, int column) const; QString rowDescription(int row) const; @@ -240,7 +237,6 @@ public: QAccessibleInterface *parent() const; QAccessibleInterface *child(int index) const; int navigate(QAccessible::RelationFlag relation, int index, QAccessibleInterface **iface) const; - QAccessible::Relation relationTo(const QAccessibleInterface *other) const; private: QAbstractItemView *view; @@ -287,11 +283,6 @@ public: return -1; } - QAccessible::Relation relationTo(const QAccessibleInterface *) const - { - return QAccessible::Unrelated; - } - private: QAbstractItemView *view; }; diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp index ffd87dd..70d1a7b 100644 --- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp +++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp @@ -993,11 +993,6 @@ int QAccessibleTitleBar::navigate(QAccessible::RelationFlag relation, int entry, return -1; } -QAccessible::Relation QAccessibleTitleBar::relationTo(const QAccessibleInterface * /*otherChild*/) const -{ - return QAccessible::Unrelated; //### -} - int QAccessibleTitleBar::indexOfChild(const QAccessibleInterface * /*child*/) const { return -1; diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.h b/src/plugins/accessible/widgets/qaccessiblewidgets.h index 82fdd3b..b531386 100644 --- a/src/plugins/accessible/widgets/qaccessiblewidgets.h +++ b/src/plugins/accessible/widgets/qaccessiblewidgets.h @@ -251,7 +251,6 @@ public: int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **iface) const; int indexOfChild(const QAccessibleInterface *child) const; int childCount() const; - QAccessible::Relation relationTo(const QAccessibleInterface *other) const; QAccessibleInterface *childAt(int x, int y) const; void setText(QAccessible::Text t, const QString &text); QString text(QAccessible::Text t) const; -- 2.7.4