summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineview_p.h
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2018-03-01 14:32:48 +0100
committerKai Koehne <kai.koehne@qt.io>2018-03-08 14:41:07 +0000
commit349d11dd83578b5baeec87e41c71f612e5bd21b3 (patch)
treef75acb8eceb571c24856800443ed3ac39fd3e6fb /src/webengine/api/qquickwebengineview_p.h
parent58b0b8d52222018c814b5e1c0d0d8cf648bca835 (diff)
Move quota and registerProtocolHandler permission classes to core
- Move QWebEngineQuotaPermissionRequest and QWebEngineRegisterProtocolHandlerPermissionRequest to QtWebEngineCore. - Delete QQuickWebEngineQuotaPermissionRequest and QQuickWebEngineRegisterProtocolHandlerPermissionRequest. Miscellaneous cleanup: - Mark QWebEngineQuotaPermissionRequest constructors as internal for QDoc. - Remove superfluous Q_DECLARE_METATYPEs (implied by Q_GADGET). - Remove Q_UNREACHABLE from default constructor. For some reason QML seems to default construct an unused temporary object before throwing it away and copy constructing the actual object. This triggers Q_UNREACHABLE. Change-Id: Icf9f4e34996e4c64aec65b734bcb3bbd22b4dc51 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/webengine/api/qquickwebengineview_p.h')
-rw-r--r--src/webengine/api/qquickwebengineview_p.h50
1 files changed, 4 insertions, 46 deletions
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index 5b018b8a..76b5c2be 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -57,12 +57,6 @@
#include <QtGui/qcolor.h>
-namespace QtWebEngineCore {
- class QuotaPermissionController;
- class RegisterProtocolHandlerPermissionController;
-}
-
-
QT_BEGIN_NAMESPACE
class QQmlWebChannel;
@@ -82,6 +76,8 @@ class QQuickWebEngineProfile;
class QQuickWebEngineSettings;
class QQuickWebEngineFormValidationMessageRequest;
class QQuickWebEngineViewPrivate;
+class QWebEngineQuotaPermissionRequest;
+class QWebEngineRegisterProtocolHandlerPermissionRequest;
#ifdef ENABLE_QML_TESTSUPPORT_API
class QQuickWebEngineTestSupport;
@@ -106,42 +102,6 @@ private:
const bool m_toggleOn;
};
-class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineQuotaPermissionRequest {
- Q_GADGET
- Q_PROPERTY(QUrl origin READ origin CONSTANT FINAL)
- Q_PROPERTY(qint64 requestedSize READ requestedSize CONSTANT FINAL)
-public:
- QQuickWebEngineQuotaPermissionRequest() {}
- QQuickWebEngineQuotaPermissionRequest(QSharedPointer<QtWebEngineCore::QuotaPermissionController> controller);
- ~QQuickWebEngineQuotaPermissionRequest();
-
- Q_INVOKABLE void accept();
- Q_INVOKABLE void reject();
- QUrl origin() const;
- qint64 requestedSize() const;
-
-private:
- QSharedPointer<QtWebEngineCore::QuotaPermissionController> d_ptr;
-};
-
-class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineRegisterProtocolHandlerPermissionRequest {
- Q_GADGET
- Q_PROPERTY(QUrl origin READ origin CONSTANT FINAL)
- Q_PROPERTY(QString protocol READ protocol CONSTANT FINAL)
-public:
- QQuickWebEngineRegisterProtocolHandlerPermissionRequest() {}
- QQuickWebEngineRegisterProtocolHandlerPermissionRequest(
- QSharedPointer<QtWebEngineCore::RegisterProtocolHandlerPermissionController>);
-
- Q_INVOKABLE void accept();
- Q_INVOKABLE void reject();
- QUrl origin() const;
- QString protocol() const;
-
-private:
- QSharedPointer<QtWebEngineCore::RegisterProtocolHandlerPermissionController> d_ptr;
-};
-
#define LATEST_WEBENGINEVIEW_REVISION 7
class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
@@ -582,11 +542,11 @@ Q_SIGNALS:
Q_REVISION(4) void fileDialogRequested(QQuickWebEngineFileDialogRequest *request);
Q_REVISION(4) void formValidationMessageRequested(QQuickWebEngineFormValidationMessageRequest *request);
Q_REVISION(5) void pdfPrintingFinished(const QString &filePath, bool success);
- Q_REVISION(7) void quotaPermissionRequested(const QQuickWebEngineQuotaPermissionRequest &request);
+ Q_REVISION(7) void quotaPermissionRequested(const QWebEngineQuotaPermissionRequest &request);
Q_REVISION(7) void geometryChangeRequested(const QRect &geometry, const QRect &frameGeometry);
Q_REVISION(7) void inspectedViewChanged();
Q_REVISION(7) void devToolsViewChanged();
- Q_REVISION(7) void registerProtocolHandlerPermissionRequested(const QQuickWebEngineRegisterProtocolHandlerPermissionRequest &request);
+ Q_REVISION(7) void registerProtocolHandlerPermissionRequested(const QWebEngineRegisterProtocolHandlerPermissionRequest &request);
#ifdef ENABLE_QML_TESTSUPPORT_API
void testSupportChanged();
@@ -616,7 +576,5 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickWebEngineView)
Q_DECLARE_METATYPE(QQuickWebEngineFullScreenRequest)
-Q_DECLARE_METATYPE(QQuickWebEngineQuotaPermissionRequest)
-Q_DECLARE_METATYPE(QQuickWebEngineRegisterProtocolHandlerPermissionRequest)
#endif // QQUICKWEBENGINEVIEW_P_H