summaryrefslogtreecommitdiff
path: root/src/webengine/plugin/plugin.cpp
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-08-25 11:37:34 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-09-24 15:14:59 +0200
commitf613095208911cfa6b8609f8b87b4984dc55e69c (patch)
tree09a25473d27a2b7d174966fb28594c07de8db510 /src/webengine/plugin/plugin.cpp
parente2e249b8bb399ef7bcf6fe3be0b4f2fc9fa18182 (diff)
downloadqtwebengine-f613095208911cfa6b8609f8b87b4984dc55e69c.tar.gz
Reuse qwebenginescript in qml
Reuse core class and adopt api: * add missing setUrlSource to c++ class * fix typing for setRunsOnSubFrames * remove all invokable from setters in qml, we use properties for that anyway. * remove invokable toString , since we have debug stream operator in c++ [ChangeLog] In qml websetttings.runOnSubframes is now websettings.runsOnSubFrames Change-Id: Iba822a7aa6a59940484c972726d710a1b66cb20d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webengine/plugin/plugin.cpp')
-rw-r--r--src/webengine/plugin/plugin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp
index d92ee59ec..8f5d319d7 100644
--- a/src/webengine/plugin/plugin.cpp
+++ b/src/webengine/plugin/plugin.cpp
@@ -60,6 +60,7 @@
#include <QtWebEngineCore/qwebengineregisterprotocolhandlerrequest.h>
#include <QtWebEngineCore/qwebenginecontextmenurequest.h>
#include <QtWebEngineCore/qwebenginedownloadrequest.h>
+#include <QtWebEngineCore/qwebenginescript.h>
QT_BEGIN_NAMESPACE
@@ -105,8 +106,8 @@ public:
qmlRegisterType<QQuickWebEngineProfile, 3>(uri, 1, 4, "WebEngineProfile");
qmlRegisterType<QQuickWebEngineProfile, 4>(uri, 1, 5, "WebEngineProfile");
qmlRegisterType<QQuickWebEngineProfile, 5>(uri, 1, 9, "WebEngineProfile");
- qRegisterMetaType<QQuickWebEngineScript>();
- qmlRegisterUncreatableType<QQuickWebEngineScript>(
+ qRegisterMetaType<QWebEngineScript>();
+ qmlRegisterUncreatableType<QWebEngineScript>(
uri, 1, 1, "WebEngineScript", msgUncreatableType("WebEngineScript")); // for enums
qRegisterMetaType<QWebEngineCertificateError>();
qmlRegisterUncreatableType<QWebEngineCertificateError>(uri, 1, 1, "WebEngineCertificateError", msgUncreatableType("WebEngineCertificateError"));