Commit 01a54bcb authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix support with block external ref

parent 48445fb4
Pipeline #56100 canceled with stage
......@@ -69,7 +69,9 @@ ArticleViewerWebEngine::ArticleViewerWebEngine(KActionCollection *ac, QWidget *p
: WebEngineViewer::WebEngineView(parent)
, mActionCollection(ac)
{
#ifndef HAVE_BLOCK_SUPPORT
mNetworkAccessManager = new WebEngineViewer::InterceptorManager(this, ac, this);
#endif
mPageEngine = new ArticleViewerWebEnginePage(this);
QWebEngineProfile *profile = mPageEngine->profile();
profile->setPersistentCookiesPolicy(QWebEngineProfile::ForcePersistentCookies);
......@@ -80,7 +82,9 @@ ArticleViewerWebEngine::ArticleViewerWebEngine(KActionCollection *ac, QWidget *p
profile->setUrlRequestInterceptor(webEngineUrlInterceptor);
#endif
setPage(mPageEngine);
#ifdef HAVE_BLOCK_SUPPORT
mNetworkAccessManager = new WebEngineViewer::InterceptorManager(this, ac, this);
auto *externalReference = new WebEngineViewer::LoadExternalReferencesUrlInterceptor(this);
// connect(externalReference, &MessageViewer::LoadExternalReferencesUrlInterceptor::urlBlocked, this, &MailWebEngineView::urlBlocked);
mNetworkAccessManager->addInterceptor(externalReference);
......
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