7#include "cidreferencesurlinterceptor.h"
8#include "htmlwriter/webengineembedpart.h"
11#include <QWebEngineUrlRequestInfo>
16using namespace MessageViewer;
17CidReferencesUrlInterceptor::CidReferencesUrlInterceptor(
QObject *parent)
18 : WebEngineViewer::NetworkPluginUrlInterceptorInterface(parent)
22CidReferencesUrlInterceptor::~CidReferencesUrlInterceptor() =
default;
24bool CidReferencesUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
26 const QUrl urlRequestUrl(info.requestUrl());
28 if (info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeImage) {
29 const QUrl newUrl =
QUrl(MessageViewer::WebEngineEmbedPart::self()->contentUrl(urlRequestUrl.path()));
31 info.redirect(newUrl);
38#include "moc_cidreferencesurlinterceptor.cpp"
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.