summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorTim Blechmann <tim@klingt.org>2014-06-01 14:35:04 +0200
committerMorten Johan Sørvig <morten.sorvig@digia.com>2014-07-02 12:56:06 +0200
commit4f155b0535c69b895d044bbbbf9535a21dd57994 (patch)
treeeb2424ee26302949ef65aec920554a1467745c4b /src/plugins
parent62f1aa7ca758f20a325d3d74702b5cd1b07e97f7 (diff)
Cocoa: Fix Qt-in-namespace build.
Wrap cocoa classes in namespace macros. Task-number: QTBUG-39382 Change-Id: Id840e666105afca21760fcb529b5765e0a534120 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h11
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h19
-rw-r--r--src/plugins/platforms/cocoa/qnswindowdelegate.h4
3 files changed, 23 insertions, 11 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
index babaab5ae2..9760f492ea 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h
@@ -43,22 +43,25 @@
#include <QtCore/qglobal.h>
+#include "qt_mac_p.h"
+
#import <Cocoa/Cocoa.h>
#import <AppKit/NSAccessibility.h>
#import <qaccessible.h>
-@class QCocoaAccessibleElement;
+@class QT_MANGLE_NAMESPACE(QCocoaAccessibleElement);
-@interface QCocoaAccessibleElement : NSObject {
+@interface QT_MANGLE_NAMESPACE(QCocoaAccessibleElement) : NSObject {
NSString *role;
QAccessible::Id axid;
}
- (id)initWithId:(QAccessible::Id)anId;
-+ (QCocoaAccessibleElement *)elementWithId:(QAccessible::Id)anId;
++ (QT_MANGLE_NAMESPACE(QCocoaAccessibleElement) *)elementWithId:(QAccessible::Id)anId;
@end
-#endif
+QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaAccessibleElement);
+#endif
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h
index bb5c0c1974..33647a8cbd 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.h
+++ b/src/plugins/platforms/cocoa/qcocoawindow.h
@@ -49,14 +49,15 @@
#include "qcocoaglcontext.h"
#include "qnsview.h"
+#include "qt_mac_p.h"
QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
-@class QNSWindowHelper;
+@class QT_MANGLE_NAMESPACE(QNSWindowHelper);
@protocol QNSWindowProtocol
-@property (nonatomic, readonly) QNSWindowHelper *helper;
+@property (nonatomic, readonly) QT_MANGLE_NAMESPACE(QNSWindowHelper) *helper;
- (void)superSendEvent:(NSEvent *)theEvent;
- (void)closeAndRelease;
@@ -65,7 +66,7 @@ QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
typedef NSWindow<QNSWindowProtocol> QCocoaNSWindow;
-@interface QNSWindowHelper : NSObject
+@interface QT_MANGLE_NAMESPACE(QNSWindowHelper) : NSObject
{
QCocoaNSWindow *_window;
QCocoaWindow *_platformWindow;
@@ -84,7 +85,9 @@ typedef NSWindow<QNSWindowProtocol> QCocoaNSWindow;
@end
-@interface QNSWindow : NSWindow<QNSWindowProtocol>
+QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSWindowHelper);
+
+@interface QT_MANGLE_NAMESPACE(QNSWindow) : NSWindow<QNSWindowProtocol>
{
QNSWindowHelper *_helper;
}
@@ -97,7 +100,9 @@ typedef NSWindow<QNSWindowProtocol> QCocoaNSWindow;
@end
-@interface QNSPanel : NSPanel<QNSWindowProtocol>
+QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSWindow);
+
+@interface QT_MANGLE_NAMESPACE(QNSPanel) : NSPanel<QNSWindowProtocol>
{
QNSWindowHelper *_helper;
}
@@ -110,7 +115,9 @@ typedef NSWindow<QNSWindowProtocol> QCocoaNSWindow;
@end
-@class QNSWindowDelegate;
+QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSPanel);
+
+@class QT_MANGLE_NAMESPACE(QNSWindowDelegate);
QT_BEGIN_NAMESPACE
// QCocoaWindow
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.h b/src/plugins/platforms/cocoa/qnswindowdelegate.h
index 5717551cc3..083466861b 100644
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.h
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.h
@@ -46,7 +46,7 @@
#include "qcocoawindow.h"
-@interface QNSWindowDelegate : NSObject <NSWindowDelegate>
+@interface QT_MANGLE_NAMESPACE(QNSWindowDelegate) : NSObject <NSWindowDelegate>
{
QCocoaWindow *m_cocoaWindow;
}
@@ -62,4 +62,6 @@
@end
+QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSWindowDelegate);
+
#endif // QNSWINDOWDELEGATE_H