diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h index d465d47e12..ea43bbbc10 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.h +++ b/src/plugins/platforms/cocoa/qcocoaintegration.h @@ -128,7 +128,9 @@ private: QAbstractEventDispatcher *mEventDispatcher; QScopedPointer mInputContext; +#ifndef QT_NO_ACCESSIBILITY QScopedPointer mAccessibility; +#endif QScopedPointer mPlatformTheme; QList mScreens; QCocoaClipboard *mCocoaClipboard; diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 100dc1962c..2fdb367c62 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -180,7 +180,9 @@ QCocoaIntegration::QCocoaIntegration() : mFontDb(new QCoreTextFontDatabase()) , mEventDispatcher(new QCocoaEventDispatcher()) , mInputContext(new QCocoaInputContext) +#ifndef QT_NO_ACCESSIBILITY , mAccessibility(new QPlatformAccessibility) +#endif , mCocoaClipboard(new QCocoaClipboard) , mCocoaDrag(new QCocoaDrag) , mNativeInterface(new QCocoaNativeInterface) @@ -352,7 +354,11 @@ QPlatformInputContext *QCocoaIntegration::inputContext() const QPlatformAccessibility *QCocoaIntegration::accessibility() const { +#ifndef QT_NO_ACCESSIBILITY return mAccessibility.data(); +#else + return 0; +#endif } QPlatformClipboard *QCocoaIntegration::clipboard() const