From 3f6bc9a9838e1bf27c10a01cfb2237afb60afe70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 9 Jan 2018 18:13:14 +0100 Subject: 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 --- src/plugins/platforms/cocoa/qcocoawindow.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h index deba861fcc..aa8fffdf7e 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.h +++ b/src/plugins/platforms/cocoa/qcocoawindow.h @@ -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; -- cgit v1.2.3