summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/web_contents_adapter_client.h2
-rw-r--r--src/core/web_contents_delegate_qt.cpp6
-rw-r--r--src/webengine/api/qquickwebengineview.cpp18
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h2
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp7
-rw-r--r--src/webenginewidgets/api/qwebenginepage_p.h2
6 files changed, 19 insertions, 18 deletions
diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h
index 215942f8..8fd401fe 100644
--- a/src/core/web_contents_adapter_client.h
+++ b/src/core/web_contents_adapter_client.h
@@ -151,7 +151,7 @@ public:
virtual void loadStarted(const QUrl &provisionalUrl) = 0;
virtual void loadCommitted() = 0;
virtual void loadVisuallyCommitted() = 0;
- virtual void loadFinished(bool success, int error_code = 0, const QString &error_description = QString()) = 0;
+ virtual void loadFinished(bool success, const QUrl &url, int errorCode = 0, const QString &errorDescription = QString()) = 0;
virtual void focusContainer() = 0;
virtual void adoptNewWindow(WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect & initialGeometry) = 0;
virtual void close() = 0;
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 5de433b3..b30fcb1e 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -153,11 +153,11 @@ void WebContentsDelegateQt::DidFailProvisionalLoad(int64 frame_id, const base::s
DidFailLoad(frame_id, validated_url, is_main_frame, error_code, error_description, render_view_host);
}
-void WebContentsDelegateQt::DidFailLoad(int64, const GURL&, bool is_main_frame, int error_code, const base::string16 &error_description, content::RenderViewHost *rvh)
+void WebContentsDelegateQt::DidFailLoad(int64, const GURL &validated_url, bool is_main_frame, int error_code, const base::string16 &error_description, content::RenderViewHost *rvh)
{
if (!is_main_frame || m_isLoadingErrorPage)
return;
- m_viewClient->loadFinished(false, error_code, toQt(error_description));
+ m_viewClient->loadFinished(false, toQt(validated_url), error_code, toQt(error_description));
m_viewClient->loadProgressChanged(0);
}
@@ -171,7 +171,7 @@ void WebContentsDelegateQt::DidFinishLoad(int64, const GURL &url, bool is_main_f
if (is_main_frame) {
m_viewClient->loadProgressChanged(100);
- m_viewClient->loadFinished(true);
+ m_viewClient->loadFinished(true, toQt(url));
content::NavigationEntry *entry = web_contents()->GetController().GetActiveEntry();
if (!entry)
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index bc9a0258..c3fb6c6c 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -298,29 +298,29 @@ Q_STATIC_ASSERT(static_cast<int>(WebEngineError::NoErrorDomain) == static_cast<i
Q_STATIC_ASSERT(static_cast<int>(WebEngineError::CertificateErrorDomain) == static_cast<int>(QQuickWebEngineView::CertificateErrorDomain));
Q_STATIC_ASSERT(static_cast<int>(WebEngineError::DnsErrorDomain) == static_cast<int>(QQuickWebEngineView::DnsErrorDomain));
-void QQuickWebEngineViewPrivate::loadFinished(bool success, int error_code, const QString &error_description)
+void QQuickWebEngineViewPrivate::loadFinished(bool success, const QUrl &url, int errorCode, const QString &errorDescription)
{
Q_Q(QQuickWebEngineView);
isLoading = false;
m_history->reset();
- if (error_code == WebEngineError::UserAbortedError) {
- QQuickWebEngineLoadRequest loadRequest(q->url(), QQuickWebEngineView::LoadStoppedStatus);
+ if (errorCode == WebEngineError::UserAbortedError) {
+ QQuickWebEngineLoadRequest loadRequest(url, QQuickWebEngineView::LoadStoppedStatus);
Q_EMIT q->loadingChanged(&loadRequest);
return;
}
if (success) {
- QQuickWebEngineLoadRequest loadRequest(q->url(), QQuickWebEngineView::LoadSucceededStatus);
+ QQuickWebEngineLoadRequest loadRequest(url, QQuickWebEngineView::LoadSucceededStatus);
Q_EMIT q->loadingChanged(&loadRequest);
return;
}
- Q_ASSERT(error_code);
+ Q_ASSERT(errorCode);
QQuickWebEngineLoadRequest loadRequest(
- q->url(),
+ url,
QQuickWebEngineView::LoadFailedStatus,
- error_description,
- error_code,
- static_cast<QQuickWebEngineView::ErrorDomain>(WebEngineError::toQtErrorDomain(error_code)));
+ errorDescription,
+ errorCode,
+ static_cast<QQuickWebEngineView::ErrorDomain>(WebEngineError::toQtErrorDomain(errorCode)));
Q_EMIT q->loadingChanged(&loadRequest);
return;
}
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index 7f43d7fe..ac8b8564 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -157,7 +157,7 @@ public:
virtual void loadStarted(const QUrl &provisionalUrl) Q_DECL_OVERRIDE;
virtual void loadCommitted() Q_DECL_OVERRIDE;
virtual void loadVisuallyCommitted() Q_DECL_OVERRIDE;
- virtual void loadFinished(bool success, int error_code = 0, const QString &error_description = QString()) Q_DECL_OVERRIDE;
+ virtual void loadFinished(bool success, const QUrl &url, int errorCode = 0, const QString &errorDescription = QString()) Q_DECL_OVERRIDE;
virtual void focusContainer() Q_DECL_OVERRIDE;
virtual void adoptNewWindow(WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &) Q_DECL_OVERRIDE;
virtual void close() Q_DECL_OVERRIDE;
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index ac677a8c..543e0c4a 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -248,11 +248,12 @@ void QWebEnginePagePrivate::loadCommitted()
updateNavigationActions();
}
-void QWebEnginePagePrivate::loadFinished(bool success, int error_code, const QString &error_description)
+void QWebEnginePagePrivate::loadFinished(bool success, const QUrl &url, int errorCode, const QString &errorDescription)
{
Q_Q(QWebEnginePage);
- Q_UNUSED(error_code);
- Q_UNUSED(error_description);
+ Q_UNUSED(url);
+ Q_UNUSED(errorCode);
+ Q_UNUSED(errorDescription);
isLoading = false;
if (success)
m_explicitUrl = QUrl();
diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h
index fab4a213..ccbfb2bc 100644
--- a/src/webenginewidgets/api/qwebenginepage_p.h
+++ b/src/webenginewidgets/api/qwebenginepage_p.h
@@ -117,7 +117,7 @@ public:
virtual void loadStarted(const QUrl &provisionalUrl) Q_DECL_OVERRIDE;
virtual void loadCommitted() Q_DECL_OVERRIDE;
virtual void loadVisuallyCommitted() Q_DECL_OVERRIDE { }
- virtual void loadFinished(bool success, int error_code, const QString &error_description = QString()) Q_DECL_OVERRIDE;
+ virtual void loadFinished(bool success, const QUrl &url, int errorCode = 0, const QString &errorDescription = QString()) Q_DECL_OVERRIDE;
virtual void focusContainer() Q_DECL_OVERRIDE;
virtual void adoptNewWindow(WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &initialGeometry) Q_DECL_OVERRIDE;
virtual void close() Q_DECL_OVERRIDE;