macOS: Namespace QNSWindowProtocol when building with -qtnamespace

Otherwise the protocol name might clash with existing protocols when
using Qt as a plugin, and those existing protocols may have lived in
images that since have been unloaded, causing crashes.

Change-Id: I68fbe290bcbf2fabf463647c960f686971e066dd
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
Tor Arne Vestbø 2018-01-09 18:13:14 +01:00 committed by Jani Heikkinen
parent 36ddfb6cc1
commit 3f6bc9a983

View File

@ -56,6 +56,9 @@ QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
@class QT_MANGLE_NAMESPACE(QNSWindowHelper);
// @compatibility_alias doesn't work with protocols
#define QNSWindowProtocol QT_MANGLE_NAMESPACE(QNSWindowProtocol)
@protocol QNSWindowProtocol
@property (nonatomic, readonly) QT_MANGLE_NAMESPACE(QNSWindowHelper) *helper;