Expose enabled state in mac accessibility.

Change-Id: I8b368cbdd7ce3bd402170a2bc2419d67a88a41ee
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Frederik Gladhorn 2012-10-02 18:24:54 +02:00 committed by The Qt Project
parent 244eeae406
commit 2147e576ae

View File

@ -109,6 +109,7 @@ static QAccessibleInterface *acast(void *ptr)
NSAccessibilityPositionAttribute,
NSAccessibilitySizeAttribute,
NSAccessibilityDescriptionAttribute,
NSAccessibilityEnabledAttribute,
nil];
}
return attributes;
@ -150,6 +151,8 @@ static QAccessibleInterface *acast(void *ptr)
return [NSValue valueWithSize: NSMakeSize(qtSize.width(), qtSize.height())];
} else if ([attribute isEqualToString:NSAccessibilityDescriptionAttribute]) {
return QCFString::toNSString(acast(accessibleInterface)->text(QAccessible::Name));
} else if ([attribute isEqualToString:NSAccessibilityEnabledAttribute]) {
return [NSNumber numberWithBool:!acast(accessibleInterface)->state().disabled];
}
return nil;