summaryrefslogtreecommitdiffstats
path: root/src/webengine
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@digia.com>2013-11-25 15:37:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-30 11:57:54 +0100
commit4343bf8fafc3407a87f6c1e3b05476676b405b1c (patch)
tree87513685c6d1c08cfe5c94e83b938662d621f9b8 /src/webengine
parent284003c590e79404ebcdd7665f61f7a533bdc0a7 (diff)
WebPage: Implement javaScriptConsoleMessage
And unskip the corresponding autotest. Change-Id: Ida2dcee38b261b2ba4ad0c5c016f5510ed1590a4 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp7
-rw-r--r--src/webengine/api/qquickwebengineview_p.h1
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 68e64ee4..79210263 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -312,6 +312,13 @@ void QQuickWebEngineViewPrivate::close()
Q_UNREACHABLE();
}
+void QQuickWebEngineViewPrivate::javaScriptConsoleMessage(int level, const QString& message, int lineNumber, const QString& sourceID)
+{
+ Q_Q(QQuickWebEngineView);
+ Q_UNUSED(level);
+ Q_EMIT q->javaScriptConsoleMessage(level, message, lineNumber, sourceID);
+}
+
void QQuickWebEngineViewPrivate::setDevicePixelRatio(qreal devicePixelRatio)
{
this->devicePixelRatio = devicePixelRatio;
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index 76fbc785..6b7b44e6 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -107,6 +107,7 @@ Q_SIGNALS:
void iconChanged();
void loadingStateChanged(QQuickWebEngineLoadRequest *loadRequest);
void loadProgressChanged();
+ void javaScriptConsoleMessage(int level, const QString &message, int lineNumber, const QString &sourceID);
protected:
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index 87c0a092..37ac9edf 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -141,6 +141,7 @@ public:
virtual void didRunJavaScript(const QVariant&, quint64) Q_DECL_OVERRIDE { }
virtual void didFetchDocumentMarkup(const QString&, quint64) Q_DECL_OVERRIDE { }
virtual void didFetchDocumentInnerText(const QString&, quint64) Q_DECL_OVERRIDE { }
+ virtual void javaScriptConsoleMessage(int level, const QString& message, int lineNumber, const QString& sourceID) Q_DECL_OVERRIDE;
void setDevicePixelRatio(qreal);