summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 11f64c5ad..569b939d8 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -602,14 +602,12 @@ void WebContentsDelegateQt::launchExternalURL(const QUrl &url, ui::PageTransitio
}
if (!navigationAllowedByPolicy || !navigationRequestAccepted) {
+ QString errorDescription;
if (!navigationAllowedByPolicy)
- didFailLoad(url, 420, QStringLiteral("Launching external protocol forbidden by WebEngineSettings::UnknownUrlSchemePolicy"));
+ errorDescription = QStringLiteral("Launching external protocol forbidden by WebEngineSettings::UnknownUrlSchemePolicy");
else
- didFailLoad(url, 420, QStringLiteral("Launching external protocol suppressed by WebContentsAdapterClient::navigationRequested"));
- if (settings->testAttribute(WebEngineSettings::ErrorPageEnabled)) {
- EmitLoadStarted(toQt(GURL(content::kUnreachableWebDataURL)), true);
- m_viewClient->webContentsAdapter()->load(toQt(GURL(content::kUnreachableWebDataURL)));
- }
+ errorDescription = QStringLiteral("Launching external protocol suppressed by WebContentsAdapterClient::navigationRequested");
+ didFailLoad(url, net::Error::ERR_ABORTED, errorDescription);
}
}