Commit 38d83230 authored by Allan Sandfeld Jensen's avatar Allan Sandfeld Jensen

Fix webenginemessageviewer with Qt 5.11

Summary:
QtWebEngine 5.11 can intercept more messages include local and data ones that
are essential to the working of the message viewer.

Reviewers: mlaurent

Reviewed By: mlaurent

Subscribers: #kde_pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D11122
parent 9e008c1c
......@@ -34,6 +34,9 @@ BlockExternalResourcesUrlInterceptor::~BlockExternalResourcesUrlInterceptor()
bool BlockExternalResourcesUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
{
if (info.requestUrl().scheme() == QStringLiteral("data")
|| info.requestUrl().scheme() == QStringLiteral("file"))
return false;
const QWebEngineUrlRequestInfo::ResourceType resourceType = info.resourceType();
const QWebEngineUrlRequestInfo::NavigationType navigationType = info.navigationType();
if (resourceType == QWebEngineUrlRequestInfo::ResourceTypeMedia
......
......@@ -47,6 +47,9 @@ LoadExternalReferencesUrlInterceptor::~LoadExternalReferencesUrlInterceptor()
bool LoadExternalReferencesUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
{
if (info.requestUrl().scheme() == QStringLiteral("data")
|| info.requestUrl().scheme() == QStringLiteral("file"))
return false;
if (d->mAllowLoadExternalReference) {
return false;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment