summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2016-10-17 13:26:00 +0200
committerJake Petroules <jake.petroules@qt.io>2016-10-17 17:18:55 +0000
commitfdf3a401b743c2e72c20f901641907b6a6ffc956 (patch)
tree6ec26121ddeb14783203e17b3f6b9e704678f0fc
parentb2586ea54a8ae13169908e3dc8a85d21e0eb2f14 (diff)
Fix namespace build on macOSv5.8.0-beta1
Forward declaring Objective C classes inside a namespace is not permitted. Declaring and defining new Objective C classes in a namespaced is also not permitted. Task-number: QTBUG-56563 Change-Id: I02c1cc9e6f56bd3d437d10a515531d7dee930376 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
-rw-r--r--src/webview/qwebview_darwin.mm5
-rw-r--r--src/webview/qwebview_darwin_p.h4
-rw-r--r--src/webview/qwebview_osx.mm6
-rw-r--r--src/webview/qwebview_osx_p.h4
4 files changed, 9 insertions, 10 deletions
diff --git a/src/webview/qwebview_darwin.mm b/src/webview/qwebview_darwin.mm
index 24587aa..6d337c2 100644
--- a/src/webview/qwebview_darwin.mm
+++ b/src/webview/qwebview_darwin.mm
@@ -106,6 +106,7 @@ static inline CGRect toCGRect(const QRectF &rect)
return CGRectMake(rect.x(), rect.y(), rect.width(), rect.height());
}
+QT_END_NAMESPACE
// -------------------------------------------------------------------------
#ifdef Q_OS_IOS
@@ -154,8 +155,6 @@ static inline CGRect toCGRect(const QRectF &rect)
#if QT_MACOS_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_10, __IPHONE_8_0)
-class QWebViewInterface;
-
@interface QtWKWebViewDelegate : NSObject<WKNavigationDelegate> {
QDarwinWebViewPrivate *qDarwinWebViewPrivate;
}
@@ -242,6 +241,8 @@ class QWebViewInterface;
@end
+QT_BEGIN_NAMESPACE
+
QDarwinWebViewPrivate::QDarwinWebViewPrivate(QObject *p)
: QWebViewPrivate(p)
, wkWebView(nil)
diff --git a/src/webview/qwebview_darwin_p.h b/src/webview/qwebview_darwin_p.h
index 4bbe6ab..2b188e8 100644
--- a/src/webview/qwebview_darwin_p.h
+++ b/src/webview/qwebview_darwin_p.h
@@ -66,14 +66,14 @@
@end
#endif
-QT_BEGIN_NAMESPACE
-
Q_FORWARD_DECLARE_OBJC_CLASS(WKWebView);
#ifdef Q_OS_IOS
Q_FORWARD_DECLARE_OBJC_CLASS(UIGestureRecognizer);
#endif
+QT_BEGIN_NAMESPACE
+
class QDarwinWebViewPrivate : public QWebViewPrivate
{
Q_OBJECT
diff --git a/src/webview/qwebview_osx.mm b/src/webview/qwebview_osx.mm
index e64ad06..80d33e5 100644
--- a/src/webview/qwebview_osx.mm
+++ b/src/webview/qwebview_osx.mm
@@ -45,10 +45,6 @@
#import <CoreFoundation/CoreFoundation.h>
#import <WebKit/WebKit.h>
-QT_BEGIN_NAMESPACE
-
-class QOsxWebViewPrivate;
-
#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11)
#define QtFrameLoadDelegateProtocol <WebFrameLoadDelegate>
#else
@@ -132,6 +128,8 @@ class QOsxWebViewPrivate;
@end
+QT_BEGIN_NAMESPACE
+
QOsxWebViewPrivate::QOsxWebViewPrivate(QWebView *q)
: QWebViewPrivate(q)
{
diff --git a/src/webview/qwebview_osx_p.h b/src/webview/qwebview_osx_p.h
index 4f5344e..33d09a2 100644
--- a/src/webview/qwebview_osx_p.h
+++ b/src/webview/qwebview_osx_p.h
@@ -54,10 +54,10 @@
#include "qwebview_p_p.h"
-QT_BEGIN_NAMESPACE
-
Q_FORWARD_DECLARE_OBJC_CLASS(WebView);
+QT_BEGIN_NAMESPACE
+
class QOsxWebViewPrivate : public QWebViewPrivate
{
Q_OBJECT