Accessibility: Do not look for the "text" property as a last resort.
authorJan-Arve Saether <jan-arve.saether@nokia.com>
Tue, 15 May 2012 13:01:23 +0000 (15:01 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 16 May 2012 15:04:58 +0000 (17:04 +0200)
This does not work very well with items where the text property
is just an alias to the concrete property on a child item.
The screen reader might then read aloud the text twice, one for the
item with the alias, and another time for the child item.

Change-Id: I11764c2988b1b3b10b6d80ed8978ef2191d51097
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
src/plugins/accessible/quick/qaccessiblequickitem.cpp

index 99db9fa..61dcbcf 100644 (file)
@@ -231,11 +231,6 @@ QString QAccessibleQuickItem::text(QAccessible::Text textType) const
         } else if (textType == QAccessible::Name) {
             return object()->objectName();
         }
-    } else {
-        if (textType == QAccessible::Name) {
-            QVariant text = object()->property("text");
-            return text.toString();
-        }
     }
 
     return QString();