Commit ffdcb056 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 00f529d0
......@@ -34,8 +34,9 @@ CidReferencesUrlInterceptor::~CidReferencesUrlInterceptor()
bool CidReferencesUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
{
if (info.requestUrl().scheme() == QLatin1String("cid")) {
const QString newUrl = MessageViewer::WebEngineEmbedPart::self()->contentUrl(info.requestUrl().path());
const QUrl urlRequestUrl(info.requestUrl());
if (urlRequestUrl.scheme() == QLatin1String("cid")) {
const QString newUrl = MessageViewer::WebEngineEmbedPart::self()->contentUrl(urlRequestUrl.path());
if (!newUrl.isEmpty()) {
info.redirect(QUrl(newUrl));
}
......
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