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