summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible/qaccessiblecache_mac.mm
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-05-19 12:28:32 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-06 20:23:08 +0200
commitd707acfc9e357ffc86feb5d9219372c30c5ff157 (patch)
tree0e9f6d4b26b6b2d0d406546d8d0531838fc5acfb /src/gui/accessible/qaccessiblecache_mac.mm
parent0f8d35ff73b80d2044e03e35d338a2acb60b8fa2 (diff)
Accessibility iOS
This lays the foundation for iOS accessibility. The approach is slightly different from other a11y bridges in that we completely flaten the hierarchy of wigets/quick items to a list. This works well with VoiceOver since there are comparatively few elements. The cache implementation for OS X is re-used. With this patch VoiceOver on iOS works on many applications out of the box. For now it sends the screen changed notfification somewhat overzealous, that will need revisiting and potentially new API in QAccessible. Device orientation changes are not yet supported. [ChangeLog][iOS] Accessibility was added to the iOS platform port. This enables Qt applications to be read by VoiceOver on iOS devices. Task-number: QTBUG-39097 Change-Id: I441e844652d528cc2fdcc444f43b54ed6fa04f0c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/gui/accessible/qaccessiblecache_mac.mm')
-rw-r--r--src/gui/accessible/qaccessiblecache_mac.mm10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gui/accessible/qaccessiblecache_mac.mm b/src/gui/accessible/qaccessiblecache_mac.mm
index 861423af7d..bc6d0712d6 100644
--- a/src/gui/accessible/qaccessiblecache_mac.mm
+++ b/src/gui/accessible/qaccessiblecache_mac.mm
@@ -41,27 +41,23 @@
#include "qaccessiblecache_p.h"
-#ifdef Q_OS_OSX
-
QT_BEGIN_NAMESPACE
-void QAccessibleCache::insertElement(QAccessible::Id axid, QCocoaAccessibleElement *element) const
+void QAccessibleCache::insertElement(QAccessible::Id axid, QMacAccessibilityElement *element) const
{
cocoaElements[axid] = element;
}
void QAccessibleCache::removeCocoaElement(QAccessible::Id axid)
{
- QCocoaAccessibleElement *element = elementForId(axid);
+ QMacAccessibilityElement *element = elementForId(axid);
[element invalidate];
cocoaElements.remove(axid);
}
-QCocoaAccessibleElement *QAccessibleCache::elementForId(QAccessible::Id axid) const
+QMacAccessibilityElement *QAccessibleCache::elementForId(QAccessible::Id axid) const
{
return cocoaElements.value(axid);
}
QT_END_NAMESPACE
-
-#endif