From 80bc08b46d2746408c69ccb3ec1dbb7db748de08 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Br=C3=BCning?= <michael.bruning@digia.com>
Date: Wed, 15 Oct 2014 16:58:13 +0200
Subject: [PATCH] Add plugins.qmltypes for WebEngine API

Task-number: QTBUG-41952
Change-Id: Ic21089a34364696c8ff7e68e397e39f8f0b7f5cc
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
---
 src/webengine/plugin/plugins.qmltypes | 164 ++++++++++++++++++++++++++
 1 file changed, 164 insertions(+)
 create mode 100644 src/webengine/plugin/plugins.qmltypes

diff --git a/src/webengine/plugin/plugins.qmltypes b/src/webengine/plugin/plugins.qmltypes
new file mode 100644
index 000000000..cebf986d2
--- /dev/null
+++ b/src/webengine/plugin/plugins.qmltypes
@@ -0,0 +1,164 @@
+import QtQuick.tooling 1.1
+
+// This file describes the plugin-supplied types contained in the library.
+// It is used for QML tooling purposes only.
+//
+// This file was auto-generated by:
+// 'qmlplugindump -noinstantiate -nonrelocatable QtWebEngine 1.0'
+
+Module {
+    Component {
+        name: "QQuickWebEngineLoadRequest"
+        prototype: "QObject"
+        exports: ["QtWebEngine/WebEngineLoadRequest 1.0"]
+        isCreatable: false
+        exportMetaObjectRevisions: [0]
+        Property { name: "url"; type: "QUrl"; isReadonly: true }
+        Property { name: "status"; type: "QQuickWebEngineView::LoadStatus"; isReadonly: true }
+        Property { name: "errorString"; type: "string"; isReadonly: true }
+        Property { name: "errorDomain"; type: "QQuickWebEngineView::ErrorDomain"; isReadonly: true }
+        Property { name: "errorCode"; type: "int"; isReadonly: true }
+    }
+    Component {
+        name: "QQuickWebEngineNavigationRequest"
+        prototype: "QObject"
+        exports: ["QtWebEngine/WebEngineNavigationRequest 1.0"]
+        isCreatable: false
+        exportMetaObjectRevisions: [0]
+        Property { name: "url"; type: "QUrl"; isReadonly: true }
+        Property { name: "isMainFrame"; type: "bool"; isReadonly: true }
+        Property { name: "action"; type: "QQuickWebEngineView::NavigationRequestAction" }
+        Property {
+            name: "navigationType"
+            type: "QQuickWebEngineView::NavigationType"
+            isReadonly: true
+        }
+    }
+    Component {
+        name: "QQuickWebEngineNewViewRequest"
+        prototype: "QObject"
+        exports: ["QtWebEngine/WebEngineNewViewRequest 1.0"]
+        isCreatable: false
+        exportMetaObjectRevisions: [0]
+        Property {
+            name: "destination"
+            type: "QQuickWebEngineView::NewViewDestination"
+            isReadonly: true
+        }
+        Property { name: "userInitiated"; type: "bool"; isReadonly: true }
+        Method {
+            name: "openIn"
+            Parameter { name: "view"; type: "QQuickWebEngineView"; isPointer: true }
+        }
+    }
+    Component {
+        name: "QQuickWebEngineView"
+        defaultProperty: "data"
+        prototype: "QQuickItem"
+        exports: ["QtWebEngine/WebEngineView 1.0"]
+        exportMetaObjectRevisions: [0]
+        Enum {
+            name: "NavigationRequestAction"
+            values: {
+                "AcceptRequest": 0,
+                "IgnoreRequest": 255
+            }
+        }
+        Enum {
+            name: "NavigationType"
+            values: {
+                "LinkClickedNavigation": 0,
+                "TypedNavigation": 1,
+                "FormSubmittedNavigation": 2,
+                "BackForwardNavigation": 3,
+                "ReloadNavigation": 4,
+                "OtherNavigation": 5
+            }
+        }
+        Enum {
+            name: "LoadStatus"
+            values: {
+                "LoadStartedStatus": 0,
+                "LoadStoppedStatus": 1,
+                "LoadSucceededStatus": 2,
+                "LoadFailedStatus": 3
+            }
+        }
+        Enum {
+            name: "ErrorDomain"
+            values: {
+                "NoErrorDomain": 0,
+                "InternalErrorDomain": 1,
+                "ConnectionErrorDomain": 2,
+                "CertificateErrorDomain": 3,
+                "HttpErrorDomain": 4,
+                "FtpErrorDomain": 5,
+                "DnsErrorDomain": 6
+            }
+        }
+        Enum {
+            name: "NewViewDestination"
+            values: {
+                "NewViewInWindow": 0,
+                "NewViewInTab": 1,
+                "NewViewInDialog": 2
+            }
+        }
+        Enum {
+            name: "JavaScriptConsoleMessageLevel"
+            values: {
+                "InfoMessageLevel": 0,
+                "WarningMessageLevel": 1,
+                "ErrorMessageLevel": 2
+            }
+        }
+        Property { name: "url"; type: "QUrl" }
+        Property { name: "icon"; type: "QUrl"; isReadonly: true }
+        Property { name: "loading"; type: "bool"; isReadonly: true }
+        Property { name: "loadProgress"; type: "int"; isReadonly: true }
+        Property { name: "title"; type: "string"; isReadonly: true }
+        Property { name: "canGoBack"; type: "bool"; isReadonly: true }
+        Property { name: "canGoForward"; type: "bool"; isReadonly: true }
+        Signal {
+            name: "loadingChanged"
+            Parameter { name: "loadRequest"; type: "QQuickWebEngineLoadRequest"; isPointer: true }
+        }
+        Signal {
+            name: "linkHovered"
+            Parameter { name: "hoveredUrl"; type: "QUrl" }
+        }
+        Signal {
+            name: "navigationRequested"
+            Parameter { name: "request"; type: "QQuickWebEngineNavigationRequest"; isPointer: true }
+        }
+        Signal {
+            name: "javaScriptConsoleMessage"
+            Parameter { name: "level"; type: "JavaScriptConsoleMessageLevel" }
+            Parameter { name: "message"; type: "string" }
+            Parameter { name: "lineNumber"; type: "int" }
+            Parameter { name: "sourceID"; type: "string" }
+        }
+        Method {
+            name: "runJavaScript"
+            Parameter { type: "string" }
+            Parameter { type: "QJSValue" }
+        }
+        Method {
+            name: "runJavaScript"
+            Parameter { type: "string" }
+        }
+        Method {
+            name: "loadHtml"
+            Parameter { name: "html"; type: "string" }
+            Parameter { name: "baseUrl"; type: "QUrl" }
+        }
+        Method {
+            name: "loadHtml"
+            Parameter { name: "html"; type: "string" }
+        }
+        Method { name: "goBack" }
+        Method { name: "goForward" }
+        Method { name: "reload" }
+        Method { name: "stop" }
+    }
+}
-- 
GitLab