Commit 8c5e01ef authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Preparing to use BlockMailTrackingUrlInterceptor

parent fb848652
Pipeline #55852 canceled with stage
......@@ -47,7 +47,7 @@ set(KPIMTEXTEDIT_LIB_VERSION "5.17.40")
set(LIBGRANTLEETHEME_LIB_VERSION "5.17.40")
set(LIBKDEPIM_LIB_VERSION "5.17.40")
set(LIBKLEO_LIB_VERSION "5.17.40")
set(MESSAGELIB_LIB_VERSION "5.17.43")
set(MESSAGELIB_LIB_VERSION "5.17.45")
set(PIMCOMMON_LIB_VERSION "5.17.40")
option(KDEPIM_KUSERFEEDBACK "Enable user feedback support (experimental)" FALSE)
......
......@@ -37,6 +37,7 @@
#include <QWebEngineUrlRequestInterceptor>
#include <viewerplugintoolmanager.h>
#include <WebEngineViewer/BlockMailTrackingUrlInterceptor>
#include <WebEngineViewer/LoadExternalReferencesUrlInterceptor>
#include <WebEngineViewer/WebEngineScript>
#include <WebEngineViewer/WebHitTest>
......@@ -83,6 +84,9 @@ ArticleViewerWebEngine::ArticleViewerWebEngine(KActionCollection *ac, QWidget *p
auto *externalReference = new WebEngineViewer::LoadExternalReferencesUrlInterceptor(this);
// connect(externalReference, &MessageViewer::LoadExternalReferencesUrlInterceptor::urlBlocked, this, &MailWebEngineView::urlBlocked);
mNetworkAccessManager->addInterceptor(externalReference);
auto *blockTracking = new WebEngineViewer::BlockMailTrackingUrlInterceptor(this);
connect(blockTracking, &WebEngineViewer::BlockMailTrackingUrlInterceptor::trackingFound, this, &MailWebEngineView::trackingFound);
mNetworkAccessManager->addInterceptor(blockTracking);
#endif
connect(this, &ArticleViewerWebEngine::showContextMenu, this, &ArticleViewerWebEngine::slotShowContextMenu);
......
......@@ -18,6 +18,7 @@
#include <KPIMTextEdit/SlideContainer>
#include <WebEngineViewer/FindBarWebEngineView>
#include <WebEngineViewer/TrackingWarningWidget>
#include <WebEngineViewer/WebEngineExportHtmlPageJob>
#include <QApplication>
......@@ -64,11 +65,16 @@ void ArticleViewerWebEngineWidgetNg::initializeLayout(KActionCollection *ac)
mTextToSpeechWidget->setObjectName(QStringLiteral("texttospeechwidget"));
layout->addWidget(mTextToSpeechWidget);
mTrackingWarningWidget = new WebEngineViewer::TrackingWarningWidget(this);
mTrackingWarningWidget->setObjectName(QStringLiteral("mTrackingWarningWidget"));
layout->addWidget(mTrackingWarningWidget);
if (!mArticleViewerNg) {
mArticleViewerNg = new ArticleViewerWebEngine(ac, this);
}
mArticleViewerNg->setObjectName(QStringLiteral("articleviewerng"));
layout->addWidget(mArticleViewerNg);
connect(mArticleViewerNg, &ArticleViewerWebEngine::mailTrackingFound, mTrackingWarningWidget, &WebEngineViewer::TrackingWarningWidget::addTracker);
mArticleViewerNg->createViewerPluginToolManager(ac, this);
......
......@@ -21,6 +21,7 @@ class TextToSpeechWidget;
namespace WebEngineViewer
{
class FindBarWebEngineView;
class TrackingWarningWidget;
}
namespace Akregator
......@@ -56,6 +57,7 @@ private:
ArticleViewerWebEngine *mArticleViewerNg = nullptr;
KPIMTextEdit::TextToSpeechWidget *mTextToSpeechWidget = nullptr;
KPIMTextEdit::SlideContainer *mSliderContainer = nullptr;
WebEngineViewer::TrackingWarningWidget *mTrackingWarningWidget = nullptr;
QPrinter *mCurrentPrinter = nullptr;
};
}
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