diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-10-14 14:45:08 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-10-14 14:41:48 +0000 |
commit | f1a168c492e445211e54d6108585e70c8ea55fbe (patch) | |
tree | 2bfe72bab005fb2749ccb96626e53a3438725740 | |
parent | c275340496c36a0466dd66eba93031e89606c475 (diff) |
Fix macOS 10.9 builds that use macOS 10.10 SDK
WebFrameLoadDelegate was an informal protocol in <= 10.10 SDK, which
means it should not be specified in the protocol conformance list.
Doing so would cause an error that the specified protocol declaration
can not be found.
Starting with macOS 10.11 SDK, it is a formal protocol, and can thus
be used in the conformance list.
Change-Id: I6bb92e202735c7c00dd19eb2b858e7fd327be89e
Task-number: QTBUG-56535
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r-- | src/webview/qwebview_osx.mm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/webview/qwebview_osx.mm b/src/webview/qwebview_osx.mm index 09ca4fb..711f62f 100644 --- a/src/webview/qwebview_osx.mm +++ b/src/webview/qwebview_osx.mm @@ -38,7 +38,7 @@ #include "qwebview_osx_p.h" #include "qwebviewloadrequest_p.h" - +#include <QtCore/qglobal.h> #include <QtCore/qstring.h> #include <QtCore/qvariant.h> @@ -49,7 +49,14 @@ QT_BEGIN_NAMESPACE class QOsxWebViewPrivate; -@interface QtFrameLoadDelegate : NSObject <WebFrameLoadDelegate> { +#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11) +#define QtFrameLoadDelegateProtocol <WebFrameLoadDelegate> +#else +// WebFrameLoadDelegate is an informal protocol in <= 10.10 SDK. +#define QtFrameLoadDelegateProtocol +#endif + +@interface QtFrameLoadDelegate : NSObject QtFrameLoadDelegateProtocol { QOsxWebViewPrivate *qtWebViewPrivate; } - (QtFrameLoadDelegate *)initWithQWebViewPrivate:(QOsxWebViewPrivate *)webViewPrivate; |