Fix QT_NO_ACCESSIBILITY build on OS X
Change-Id: Id8b41787fb9f50296ee9e0ad1f108418565d9325 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>bb10
parent
30335364a1
commit
a5fb312cd6
|
|
@ -38,6 +38,8 @@
|
|||
#include <QtGui>
|
||||
#include <qpa/qplatformaccessibility.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QCocoaAccessibility : public QPlatformAccessibility
|
||||
|
|
@ -85,4 +87,6 @@ id getValueAttribute(QAccessibleInterface *interface);
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
||||
#endif // QCOCOAACCESIBILITY_H
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
|
||||
QCocoaAccessibility::QCocoaAccessibility()
|
||||
{
|
||||
|
||||
|
|
@ -374,5 +376,7 @@ id getValueAttribute(QAccessibleInterface *interface)
|
|||
|
||||
} // namespace QCocoaAccessible
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
|
||||
#include "qt_mac_p.h"
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <AppKit/NSAccessibility.h>
|
||||
|
||||
|
|
@ -56,4 +58,6 @@
|
|||
|
||||
QT_NAMESPACE_ALIAS_OBJC_CLASS(QMacAccessibilityElement);
|
||||
|
||||
#endif
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
||||
#endif // QCOCOAACCESIBILITYELEMENT_H
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@
|
|||
|
||||
QT_USE_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
|
||||
static void convertLineOffset(QAccessibleTextInterface *text, int &line, int &offset, NSUInteger *start = 0, NSUInteger *end = 0)
|
||||
{
|
||||
Q_ASSERT(line == -1 || offset == -1);
|
||||
|
|
@ -580,3 +582,5 @@ static void convertLineOffset(QAccessibleTextInterface *text, int &line, int &of
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
|
|
|||
|
|
@ -121,7 +121,9 @@ public:
|
|||
QCoreTextFontDatabase *fontDatabase() const Q_DECL_OVERRIDE;
|
||||
QCocoaNativeInterface *nativeInterface() const Q_DECL_OVERRIDE;
|
||||
QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE;
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
QCocoaAccessibility *accessibility() const Q_DECL_OVERRIDE;
|
||||
#endif
|
||||
QCocoaClipboard *clipboard() const Q_DECL_OVERRIDE;
|
||||
QCocoaDrag *drag() const Q_DECL_OVERRIDE;
|
||||
|
||||
|
|
|
|||
|
|
@ -502,14 +502,12 @@ QPlatformInputContext *QCocoaIntegration::inputContext() const
|
|||
return mInputContext.data();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
QCocoaAccessibility *QCocoaIntegration::accessibility() const
|
||||
{
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
return mAccessibility.data();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
QCocoaClipboard *QCocoaIntegration::clipboard() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@
|
|||
|
||||
#import <AppKit/NSAccessibility.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
|
||||
@implementation QNSView (QNSViewAccessibility)
|
||||
|
||||
- (id)childAccessibleElement {
|
||||
|
|
@ -80,3 +82,5 @@
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
|
|
|||
Loading…
Reference in New Issue