summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineview_p.h
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@digia.com>2014-04-14 16:07:51 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-14 18:17:22 +0200
commit1a66aba6aae45292c7fdd88c985ce1122e8e58dc (patch)
treeef3bb11c9e5530550f59ab057d7bee736c29c5a4 /src/webengine/api/qquickwebengineview_p.h
parentaff45885400cd068fbf438a941736841e41607b4 (diff)
Map Javascript console message level to enum values.
Translates the internally used LogSeverity values to enums defined by the QtWebEngine integration layer. Change-Id: I7da0983d4fb5c199e1a2436b5899a43cf6698784 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/webengine/api/qquickwebengineview_p.h')
-rw-r--r--src/webengine/api/qquickwebengineview_p.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index 3ad2e59b..40bc59f4 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -63,6 +63,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
Q_ENUMS(LoadStatus);
Q_ENUMS(ErrorDomain);
Q_ENUMS(NewViewDestination);
+ Q_ENUMS(JavaScriptConsoleMessageLevel);
public:
QQuickWebEngineView(QQuickItem *parent = 0);
@@ -102,6 +103,13 @@ public:
NewViewInTab
};
+ // must match WebContentsAdapterClient::JavaScriptConsoleMessageLevel
+ enum JavaScriptConsoleMessageLevel {
+ Info = 0,
+ Warning,
+ Error
+ };
+
public Q_SLOTS:
void loadHtml(const QString &html, const QUrl &baseUrl = QUrl(), const QUrl &unreachableUrl = QUrl());
void goBack();
@@ -115,7 +123,7 @@ Q_SIGNALS:
void iconChanged();
void loadingChanged(QQuickWebEngineLoadRequest *loadRequest);
void loadProgressChanged();
- void javaScriptConsoleMessage(int level, const QString &message, int lineNumber, const QString &sourceID);
+ void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID);
protected:
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);