diff options
author | Michal Klocek <michal.klocek@qt.io> | 2020-08-07 10:49:22 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2020-08-14 16:34:53 +0200 |
commit | cf830e3122c94e429321f43ddc81b860bd223a72 (patch) | |
tree | 0d5718e3367e236754cc8c8e89376fa26a85760a /src/core | |
parent | c7a10dd8b0426a84205958a3f832a36fd35e24ca (diff) |
Cleanup namespace issues in core
Change-Id: Ifdffc556278fa5d133da1896600a71248662e9fa
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/api/qwebenginecertificateerror.cpp | 51 | ||||
-rw-r--r-- | src/core/api/qwebenginecertificateerror.h | 8 | ||||
-rw-r--r-- | src/core/browser_accessibility_manager_qt.h | 4 | ||||
-rw-r--r-- | src/core/certificate_error_controller.cpp | 6 | ||||
-rw-r--r-- | src/core/certificate_error_controller.h | 5 | ||||
-rw-r--r-- | src/core/client_cert_select_controller.cpp | 7 | ||||
-rw-r--r-- | src/core/client_cert_select_controller.h | 4 | ||||
-rw-r--r-- | src/core/pref_service_adapter.h | 4 | ||||
-rw-r--r-- | src/core/profile_qt.h | 4 | ||||
-rw-r--r-- | src/core/render_widget_host_view_qt.h | 4 | ||||
-rw-r--r-- | src/core/render_widget_host_view_qt_delegate_client.h | 1 | ||||
-rw-r--r-- | src/core/visited_links_manager_qt.h | 4 | ||||
-rw-r--r-- | src/core/web_contents_adapter_client.h | 4 | ||||
-rw-r--r-- | src/core/web_contents_delegate_qt.h | 3 |
14 files changed, 53 insertions, 56 deletions
diff --git a/src/core/api/qwebenginecertificateerror.cpp b/src/core/api/qwebenginecertificateerror.cpp index 2e5768a0c..cf8a20d53 100644 --- a/src/core/api/qwebenginecertificateerror.cpp +++ b/src/core/api/qwebenginecertificateerror.cpp @@ -43,22 +43,38 @@ QT_BEGIN_NAMESPACE -ASSERT_ENUMS_MATCH(CertificateErrorController::SslPinnedKeyNotInCertificateChain, QWebEngineCertificateError::SslPinnedKeyNotInCertificateChain); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateCommonNameInvalid, QWebEngineCertificateError::CertificateCommonNameInvalid); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateCommonNameInvalid, QWebEngineCertificateError::CertificateCommonNameInvalid); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateDateInvalid, QWebEngineCertificateError::CertificateDateInvalid); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateAuthorityInvalid, QWebEngineCertificateError::CertificateAuthorityInvalid); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateContainsErrors, QWebEngineCertificateError::CertificateContainsErrors); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateUnableToCheckRevocation, QWebEngineCertificateError::CertificateUnableToCheckRevocation); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateRevoked, QWebEngineCertificateError::CertificateRevoked); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateInvalid, QWebEngineCertificateError::CertificateInvalid); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateWeakSignatureAlgorithm, QWebEngineCertificateError::CertificateWeakSignatureAlgorithm); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateNonUniqueName, QWebEngineCertificateError::CertificateNonUniqueName); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateWeakKey, QWebEngineCertificateError::CertificateWeakKey); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateNameConstraintViolation, QWebEngineCertificateError::CertificateNameConstraintViolation); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateValidityTooLong, QWebEngineCertificateError::CertificateValidityTooLong); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateTransparencyRequired, QWebEngineCertificateError::CertificateTransparencyRequired); -ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateKnownInterceptionBlocked, QWebEngineCertificateError::CertificateKnownInterceptionBlocked); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::SslPinnedKeyNotInCertificateChain, + QWebEngineCertificateError::SslPinnedKeyNotInCertificateChain); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateCommonNameInvalid, + QWebEngineCertificateError::CertificateCommonNameInvalid); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateCommonNameInvalid, + QWebEngineCertificateError::CertificateCommonNameInvalid); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateDateInvalid, + QWebEngineCertificateError::CertificateDateInvalid); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateAuthorityInvalid, + QWebEngineCertificateError::CertificateAuthorityInvalid); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateContainsErrors, + QWebEngineCertificateError::CertificateContainsErrors); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateUnableToCheckRevocation, + QWebEngineCertificateError::CertificateUnableToCheckRevocation); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateRevoked, + QWebEngineCertificateError::CertificateRevoked); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateInvalid, + QWebEngineCertificateError::CertificateInvalid); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateWeakSignatureAlgorithm, + QWebEngineCertificateError::CertificateWeakSignatureAlgorithm); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateNonUniqueName, + QWebEngineCertificateError::CertificateNonUniqueName); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateWeakKey, + QWebEngineCertificateError::CertificateWeakKey); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateNameConstraintViolation, + QWebEngineCertificateError::CertificateNameConstraintViolation); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateValidityTooLong, + QWebEngineCertificateError::CertificateValidityTooLong); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateTransparencyRequired, + QWebEngineCertificateError::CertificateTransparencyRequired); +ASSERT_ENUMS_MATCH(QtWebEngineCore::CertificateErrorController::CertificateKnownInterceptionBlocked, + QWebEngineCertificateError::CertificateKnownInterceptionBlocked); /*! \class QWebEngineCertificateError @@ -72,7 +88,8 @@ ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateKnownInterceptionBlock /*! \internal */ -QWebEngineCertificateError::QWebEngineCertificateError(const QSharedPointer<CertificateErrorController> &controller) +QWebEngineCertificateError::QWebEngineCertificateError( + const QSharedPointer<QtWebEngineCore::CertificateErrorController> &controller) : d(controller) { } diff --git a/src/core/api/qwebenginecertificateerror.h b/src/core/api/qwebenginecertificateerror.h index 6097f430c..029c2a512 100644 --- a/src/core/api/qwebenginecertificateerror.h +++ b/src/core/api/qwebenginecertificateerror.h @@ -48,12 +48,11 @@ namespace QtWebEngineCore { class WebContentsDelegateQt; +class CertificateErrorController; } QT_BEGIN_NAMESPACE -class CertificateErrorController; - class Q_WEBENGINECORE_EXPORT QWebEngineCertificateError { Q_GADGET Q_PROPERTY(QUrl url READ url CONSTANT FINAL) @@ -105,8 +104,9 @@ public: private: friend class QtWebEngineCore::WebContentsDelegateQt; - QWebEngineCertificateError(const QSharedPointer<CertificateErrorController> &controller); - QSharedPointer<CertificateErrorController> d; + QWebEngineCertificateError( + const QSharedPointer<QtWebEngineCore::CertificateErrorController> &controller); + QSharedPointer<QtWebEngineCore::CertificateErrorController> d; }; QT_END_NAMESPACE diff --git a/src/core/browser_accessibility_manager_qt.h b/src/core/browser_accessibility_manager_qt.h index 6d6086811..511f6bf9a 100644 --- a/src/core/browser_accessibility_manager_qt.h +++ b/src/core/browser_accessibility_manager_qt.h @@ -47,9 +47,7 @@ #if QT_CONFIG(accessibility) -QT_BEGIN_NAMESPACE -class QAccessibleInterface; -QT_END_NAMESPACE +QT_FORWARD_DECLARE_CLASS(QAccessibleInterface) namespace content { diff --git a/src/core/certificate_error_controller.cpp b/src/core/certificate_error_controller.cpp index 7fa54bf5d..f13ece1bc 100644 --- a/src/core/certificate_error_controller.cpp +++ b/src/core/certificate_error_controller.cpp @@ -47,9 +47,7 @@ #include "components/strings/grit/components_strings.h" #include "type_conversion.h" -QT_BEGIN_NAMESPACE - -using namespace QtWebEngineCore; +namespace QtWebEngineCore { ASSERT_ENUMS_MATCH(CertificateErrorController::SslPinnedKeyNotInCertificateChain, net::ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN) ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateCommonNameInvalid, net::ERR_CERT_BEGIN) @@ -221,4 +219,4 @@ QList<QSslCertificate> CertificateErrorController::certificateChain() const return m_certificateChain; } -QT_END_NAMESPACE +} diff --git a/src/core/certificate_error_controller.h b/src/core/certificate_error_controller.h index 1b2d102dd..828a62070 100644 --- a/src/core/certificate_error_controller.h +++ b/src/core/certificate_error_controller.h @@ -64,7 +64,7 @@ class SSLInfo; } class GURL; -QT_BEGIN_NAMESPACE +namespace QtWebEngineCore { class Q_WEBENGINECORE_PRIVATE_EXPORT CertificateErrorController { public: @@ -128,6 +128,5 @@ private: Q_DISABLE_COPY(CertificateErrorController) }; -QT_END_NAMESPACE - +} #endif // CERTIFICATE_ERROR_CONTROLLER_H diff --git a/src/core/client_cert_select_controller.cpp b/src/core/client_cert_select_controller.cpp index 0bfdba851..e0530bf44 100644 --- a/src/core/client_cert_select_controller.cpp +++ b/src/core/client_cert_select_controller.cpp @@ -50,9 +50,7 @@ #include <QDebug> -QT_BEGIN_NAMESPACE - -using namespace QtWebEngineCore; +namespace QtWebEngineCore { ClientCertSelectController::ClientCertSelectController(net::SSLCertRequestInfo *certRequestInfo, std::vector<std::unique_ptr<net::ClientCertIdentity>> clientCerts, @@ -145,5 +143,4 @@ QList<QSslCertificate> ClientCertSelectController::certificates() const } #endif // !defined(QT_NO_SSL) || QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) - -QT_END_NAMESPACE +} diff --git a/src/core/client_cert_select_controller.h b/src/core/client_cert_select_controller.h index 59157f7cc..72f89f720 100644 --- a/src/core/client_cert_select_controller.h +++ b/src/core/client_cert_select_controller.h @@ -70,7 +70,7 @@ class ClientCertIdentity; class SSLCertRequestInfo; } -QT_BEGIN_NAMESPACE +namespace QtWebEngineCore { class Q_WEBENGINECORE_PRIVATE_EXPORT ClientCertSelectController { public: @@ -96,6 +96,6 @@ private: bool m_selected; }; -QT_END_NAMESPACE +} #endif // CLIENT_CERT_SELECT_CONTROLLER_H diff --git a/src/core/pref_service_adapter.h b/src/core/pref_service_adapter.h index 0092bd8a5..5c4c6e92a 100644 --- a/src/core/pref_service_adapter.h +++ b/src/core/pref_service_adapter.h @@ -44,9 +44,7 @@ #include "components/prefs/pref_service.h" #include "qtwebenginecoreglobal_p.h" -QT_BEGIN_NAMESPACE -class QStringList; -QT_END_NAMESPACE +QT_FORWARD_DECLARE_CLASS(QStringList) namespace QtWebEngineCore { diff --git a/src/core/profile_qt.h b/src/core/profile_qt.h index 59f5a8c21..df84136bc 100644 --- a/src/core/profile_qt.h +++ b/src/core/profile_qt.h @@ -48,9 +48,7 @@ #include "profile_io_data_qt.h" #include <QtGlobal> -QT_BEGIN_NAMESPACE -class QStringList; -QT_END_NAMESPACE +QT_FORWARD_DECLARE_CLASS(QStringList) class InMemoryPrefStore; class PrefService; diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h index 7ed01f424..c13facf00 100644 --- a/src/core/render_widget_host_view_qt.h +++ b/src/core/render_widget_host_view_qt.h @@ -54,9 +54,7 @@ #include "content/browser/renderer_host/text_input_manager.h" #include "ui/events/gesture_detection/filtered_gesture_provider.h" -QT_BEGIN_NAMESPACE -class QAccessibleInterface; -QT_END_NAMESPACE +QT_FORWARD_DECLARE_CLASS(QAccessibleInterface) namespace content { class RenderFrameHost; diff --git a/src/core/render_widget_host_view_qt_delegate_client.h b/src/core/render_widget_host_view_qt_delegate_client.h index f67bed861..c338df95e 100644 --- a/src/core/render_widget_host_view_qt_delegate_client.h +++ b/src/core/render_widget_host_view_qt_delegate_client.h @@ -59,7 +59,6 @@ QT_BEGIN_NAMESPACE class QEvent; class QVariant; - class QMouseEvent; class QKeyEvent; class QTabletEvent; diff --git a/src/core/visited_links_manager_qt.h b/src/core/visited_links_manager_qt.h index c4e24ce1f..27d46f8ff 100644 --- a/src/core/visited_links_manager_qt.h +++ b/src/core/visited_links_manager_qt.h @@ -55,9 +55,7 @@ #include <QList> #include <QScopedPointer> -QT_BEGIN_NAMESPACE -class QUrl; -QT_END_NAMESPACE +QT_FORWARD_DECLARE_CLASS(QUrl) namespace visitedlink { class VisitedLinkWriter; diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h index 021a86e3e..13f1a4563 100644 --- a/src/core/web_contents_adapter_client.h +++ b/src/core/web_contents_adapter_client.h @@ -61,8 +61,6 @@ #include <QStringList> #include <QUrl> -QT_FORWARD_DECLARE_CLASS(CertificateErrorController) -QT_FORWARD_DECLARE_CLASS(ClientCertSelectController) QT_FORWARD_DECLARE_CLASS(QKeyEvent) QT_FORWARD_DECLARE_CLASS(QVariant) QT_FORWARD_DECLARE_CLASS(QWebEngineFindTextResult) @@ -79,6 +77,8 @@ struct DropData; namespace QtWebEngineCore { +class CertificateErrorController; +class ClientCertSelectController; class AuthenticationDialogController; class ColorChooserController; class FilePickerController; diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h index cecfd1ac4..86b697488 100644 --- a/src/core/web_contents_delegate_qt.h +++ b/src/core/web_contents_delegate_qt.h @@ -55,9 +55,6 @@ #include <QtCore/qlist.h> #include <QWebEngineCertificateError> -QT_FORWARD_DECLARE_CLASS(CertificateErrorController) -QT_FORWARD_DECLARE_CLASS(ClientCertSelectController) - namespace content { class ColorChooser; class SiteInstance; |