summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-06-03 16:01:24 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-09-09 15:19:07 +0200
commitcd61343ceb4a3de8ce16082917a2f197b2481d08 (patch)
treeae88767edf6b3dc07b8dcf54c97a779eb2812768 /src/core/web_contents_delegate_qt.cpp
parentfc3893ea80296bd17e1797d5caf4479e0be4afd1 (diff)
Chromium 81-based adaptations
Change-Id: Ie422b327025da084bc8038c7a0aadee2db801f29 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 7822d7a41..e75a461e2 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -459,7 +459,7 @@ void WebContentsDelegateQt::didFailLoad(const QUrl &url, int errorCode, const QS
EmitLoadFinished(false /* success */ , url, false /* isErrorPage */, errorCode, errorDescription);
}
-void WebContentsDelegateQt::DidFailLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code, const base::string16& error_description)
+void WebContentsDelegateQt::DidFailLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code)
{
if (m_loadingState == LoadingState::Loading)
setLoadingState(LoadingState::Loaded);
@@ -476,7 +476,11 @@ void WebContentsDelegateQt::DidFailLoad(content::RenderFrameHost* render_frame_h
EmitLoadFinished(false /* success */, toQt(validated_url), true /* isErrorPage */);
return;
}
-
+ // Qt6: Consider getting rid of the error_description (Chromium already has)
+ base::string16 error_description;
+ error_description = error_page::LocalizedError::GetErrorDetails(
+ error_code <= 0 ? error_page::Error::kNetErrorDomain : error_page::Error::kHttpErrorDomain,
+ error_code, false, false);
didFailLoad(toQt(validated_url), error_code, toQt(error_description));
}