summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-09-10 12:17:32 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-09-11 07:37:06 +0000
commita5fb312cd631b1c70fc199245724e077727578a5 (patch)
tree14b4aa1260c619946c5760f9fda4783c1428a726 /src/plugins/platforms
parent30335364a114dd145bad21e9c2519ac390cd73b6 (diff)
Fix QT_NO_ACCESSIBILITY build on OS X
Change-Id: Id8b41787fb9f50296ee9e0ad1f108418565d9325 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibility.h6
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibility.mm4
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h6
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm4
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm6
-rw-r--r--src/plugins/platforms/cocoa/qnsviewaccessibility.mm4
7 files changed, 26 insertions, 6 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.h b/src/plugins/platforms/cocoa/qcocoaaccessibility.h
index 18ff9aeb29..228643ab26 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibility.h
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.h
@@ -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
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
index 03f585d19d..4e901ba015 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
@@ -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
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
index 9f56d306f4..73aeae129b 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
@@ -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
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
index 84d60df3ef..28f3b2af84 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
@@ -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
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h
index 32a08dbb0d..e7e21c356a 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.h
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.h
@@ -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;
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 051a1c8710..6bec6b191d 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -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
{
diff --git a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
index 93f0817aad..1f15da5b3b 100644
--- a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
+++ b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
@@ -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