From: Konstantin Ritt Date: Thu, 19 Apr 2012 09:50:05 +0000 (+0300) Subject: qwindowsintegration: fix build with -no-accessibility config option set X-Git-Tag: 071012110112~1555 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73423db31d505e4101b446554c840e933c93f7df;p=profile%2Fivi%2Fqtbase.git qwindowsintegration: fix build with -no-accessibility config option set Change-Id: I2f4080b04f61ec425d41180f0163cebcc745c1b9 Reviewed-by: Oswald Buddenhagen Reviewed-by: Friedemann Kleint --- diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index c5b1dcc..6913bc8 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -47,7 +47,9 @@ #include "qtwindowsglobal.h" #include "qwindowsmime.h" #include "qwindowsinputcontext.h" +#ifndef QT_NO_ACCESSIBILITY #include "accessible/qwindowsaccessibility.h" +#endif #include "qwindowsscreen.h" #include "qwindowstheme.h" @@ -698,7 +700,11 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, case QtWindows::UnknownEvent: return false; case QtWindows::AccessibleObjectFromWindowRequest: +#ifndef QT_NO_ACCESSIBILITY return QWindowsAccessibility::handleAccessibleObjectFromWindowRequest(hwnd, wParam, lParam, result); +#else + return false; +#endif case QtWindows::DisplayChangedEvent: return d->m_screenManager.handleDisplayChange(wParam, lParam); default: diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index d8d04fc..f014a95 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -56,7 +56,9 @@ #include "qwindowsdrag.h" #include "qwindowsinputcontext.h" #include "qwindowskeymapper.h" +#ifndef QT_NO_ACCESSIBILITY #include "accessible/qwindowsaccessibility.h" +#endif #include #include @@ -182,7 +184,9 @@ struct QWindowsIntegrationPrivate QWindowsGuiEventDispatcher *m_eventDispatcher; QOpenGLStaticContextPtr m_staticOpenGLContext; QWindowsInputContext m_inputContext; +#ifndef QT_NO_ACCESSIBILITY QWindowsAccessibility m_accessibility; +#endif QWindowsServices m_services; }; @@ -374,10 +378,12 @@ QPlatformInputContext * QWindowsIntegration::inputContext() const return &d->m_inputContext; } +#ifndef QT_NO_ACCESSIBILITY QPlatformAccessibility *QWindowsIntegration::accessibility() const { return &d->m_accessibility; } +#endif QWindowsIntegration *QWindowsIntegration::instance() { diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h index 20fd790..84bbf61 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.h +++ b/src/plugins/platforms/windows/qwindowsintegration.h @@ -66,7 +66,9 @@ public: virtual QPlatformClipboard *clipboard() const; virtual QPlatformDrag *drag() const; virtual QPlatformInputContext *inputContext() const; +#ifndef QT_NO_ACCESSIBILITY virtual QPlatformAccessibility *accessibility() const; +#endif virtual QPlatformNativeInterface *nativeInterface() const; virtual QPlatformFontDatabase *fontDatabase() const; virtual QStringList themeNames() const; diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro index 87bc724..63275d3 100644 --- a/src/plugins/platforms/windows/windows.pro +++ b/src/plugins/platforms/windows/windows.pro @@ -149,6 +149,7 @@ contains(QT_CONFIG, freetype) { OTHER_FILES += windows.json -include(accessible/accessible.pri) +contains(QT_CONFIG, accessibility):include(accessible/accessible.pri) + target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target