diff --git a/src/gui/kernel/qplatformintegration_qpa.cpp b/src/gui/kernel/qplatformintegration_qpa.cpp index f3acf43e94..7c72ab43aa 100644 --- a/src/gui/kernel/qplatformintegration_qpa.cpp +++ b/src/gui/kernel/qplatformintegration_qpa.cpp @@ -217,7 +217,7 @@ QPlatformInputContext *QPlatformIntegration::inputContext() const */ QPlatformAccessibility *QPlatformIntegration::accessibility() const { - return new QPlatformAccessibility; + return 0; } QVariant QPlatformIntegration::styleHint(StyleHint hint) const diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h index 6e845de790..0ebe5d5af1 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.h +++ b/src/plugins/platforms/cocoa/qcocoaintegration.h @@ -86,11 +86,13 @@ public: QPlatformMenuBar *createPlatformMenuBar(QMenuBar *menuBar = 0) const; QPlatformNativeInterface *nativeInterface() const; + QPlatformAccessibility *accessibility() const; private: QPlatformFontDatabase *mFontDb; QAbstractEventDispatcher *mEventDispatcher; QCocoaAutoReleasePool *mPool; + QPlatformAccessibility *mAccessibility; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 18fa968ce1..e4d3bb01dd 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -51,6 +51,7 @@ #include "qcocoaapplicationdelegate.h" #include "qmenu_mac.h" +#include #include #include @@ -124,10 +125,13 @@ QCocoaIntegration::QCocoaIntegration() QCocoaScreen *screen = new QCocoaScreen(i); screenAdded(screen); } + + mAccessibility = new QPlatformAccessibility; } QCocoaIntegration::~QCocoaIntegration() { + delete mAccessibility; delete mPool; } @@ -183,4 +187,9 @@ QPlatformNativeInterface *QCocoaIntegration::nativeInterface() const return new QCocoaNativeInterface(); } +QPlatformAccessibility *QCocoaIntegration::accessibility() const +{ + return mAccessibility; +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 185765bb34..91d7e287f3 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -78,6 +78,7 @@ #include #include +#include QXcbIntegration::QXcbIntegration(const QStringList ¶meters) : m_eventDispatcher(createUnixEventDispatcher()) @@ -104,11 +105,14 @@ QXcbIntegration::QXcbIntegration(const QStringList ¶meters) m_nativeInterface = new QXcbNativeInterface; m_inputContext = QPlatformInputContextFactory::create(); + + m_accessibility = new QPlatformAccessibility(); } QXcbIntegration::~QXcbIntegration() { qDeleteAll(m_connections); + delete m_accessibility; } QPlatformWindow *QXcbIntegration::createPlatformWindow(QWindow *window) const @@ -228,3 +232,8 @@ QPlatformInputContext *QXcbIntegration::inputContext() const { return m_inputContext; } + +QPlatformAccessibility *QXcbIntegration::accessibility() const +{ + return m_accessibility; +} diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h index cad127c28e..d451507425 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.h +++ b/src/plugins/platforms/xcb/qxcbintegration.h @@ -74,6 +74,8 @@ public: QPlatformInputContext *inputContext() const; + QPlatformAccessibility *accessibility() const; + private: QList m_connections; @@ -82,6 +84,8 @@ private: QPlatformInputContext *m_inputContext; QAbstractEventDispatcher *m_eventDispatcher; + + QPlatformAccessibility *m_accessibility; }; QT_END_NAMESPACE