diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2018-03-02 11:18:47 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2018-04-13 08:14:14 +0000 |
commit | 2adc7eabb86dd3a7435ca205324091ca4095c78d (patch) | |
tree | b16b92cc80d160a934e2fd1e9433da536443a9cf | |
parent | 674662d37844d6c77388053168e7f7b8432e6f59 (diff) |
Private constructors for permission classes
Change-Id: I55b033a03ec581841e1cea55c3d707067ee5ef42
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
-rw-r--r-- | src/core/api/qwebenginequotarequest.h | 6 | ||||
-rw-r--r-- | src/core/api/qwebengineregisterprotocolhandlerrequest.h | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/core/api/qwebenginequotarequest.h b/src/core/api/qwebenginequotarequest.h index dbba6ad82..be71635c1 100644 --- a/src/core/api/qwebenginequotarequest.h +++ b/src/core/api/qwebenginequotarequest.h @@ -45,7 +45,8 @@ #include <QtWebEngineCore/qtwebenginecoreglobal.h> namespace QtWebEngineCore { - class QuotaRequestController; +class QuotaPermissionContextQt; +class QuotaRequestController; } QT_BEGIN_NAMESPACE @@ -56,7 +57,6 @@ class QWEBENGINE_EXPORT QWebEngineQuotaRequest { Q_PROPERTY(qint64 requestedSize READ requestedSize CONSTANT FINAL) public: QWebEngineQuotaRequest() {} - QWebEngineQuotaRequest(QSharedPointer<QtWebEngineCore::QuotaRequestController>); Q_INVOKABLE void accept(); Q_INVOKABLE void reject(); QUrl origin() const; @@ -64,6 +64,8 @@ public: bool operator==(const QWebEngineQuotaRequest &that) const { return d_ptr == that.d_ptr; } bool operator!=(const QWebEngineQuotaRequest &that) const { return d_ptr != that.d_ptr; } private: + QWebEngineQuotaRequest(QSharedPointer<QtWebEngineCore::QuotaRequestController>); + friend QtWebEngineCore::QuotaPermissionContextQt; QSharedPointer<QtWebEngineCore::QuotaRequestController> d_ptr; }; diff --git a/src/core/api/qwebengineregisterprotocolhandlerrequest.h b/src/core/api/qwebengineregisterprotocolhandlerrequest.h index 936043b4d..b3707bc59 100644 --- a/src/core/api/qwebengineregisterprotocolhandlerrequest.h +++ b/src/core/api/qwebengineregisterprotocolhandlerrequest.h @@ -45,7 +45,8 @@ #include <QtWebEngineCore/qtwebenginecoreglobal.h> namespace QtWebEngineCore { - class RegisterProtocolHandlerRequestController; +class RegisterProtocolHandlerRequestController; +class WebContentsDelegateQt; } QT_BEGIN_NAMESPACE @@ -56,8 +57,6 @@ class QWEBENGINE_EXPORT QWebEngineRegisterProtocolHandlerRequest { Q_PROPERTY(QString scheme READ scheme CONSTANT FINAL) public: QWebEngineRegisterProtocolHandlerRequest() {} - QWebEngineRegisterProtocolHandlerRequest( - QSharedPointer<QtWebEngineCore::RegisterProtocolHandlerRequestController>); Q_INVOKABLE void accept(); Q_INVOKABLE void reject(); QUrl origin() const; @@ -65,6 +64,9 @@ public: bool operator==(const QWebEngineRegisterProtocolHandlerRequest &that) const { return d_ptr == that.d_ptr; } bool operator!=(const QWebEngineRegisterProtocolHandlerRequest &that) const { return d_ptr != that.d_ptr; } private: + QWebEngineRegisterProtocolHandlerRequest( + QSharedPointer<QtWebEngineCore::RegisterProtocolHandlerRequestController>); + friend QtWebEngineCore::WebContentsDelegateQt; QSharedPointer<QtWebEngineCore::RegisterProtocolHandlerRequestController> d_ptr; }; |