summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2014-09-03 16:59:37 +0200
committerAndras Becsi <andras.becsi@digia.com>2014-09-05 15:59:34 +0200
commitdaf3a688306f95a12969837e3d2b7d84ae30359a (patch)
treeba4399b1073f61888b2942006fbd4674d944ab85 /src/core
parent747ab86acec5c2662a2631985762d468891d6801 (diff)
Fix url stored in LoadRequest
The test_urlProperty() qml test has failed because the active url was stored in LoadRequest in case of LoadFailedStatus. With this fix the loadRequest stores the url of that page which implies the request. Change-Id: I6aab814a4a7d3b47043b03fccde3d9995b40d8fa Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/web_contents_adapter_client.h2
-rw-r--r--src/core/web_contents_delegate_qt.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h
index 215942f8f..8fd401fe4 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 5de433b3b..b30fcb1e3 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)