Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Messagelib
Commits
249c0301
Commit
249c0301
authored
May 29, 2020
by
Laurent Montel
Browse files
Make sure that resourceType is a QWebEngineUrlRequestInfo::ResourceTypeImage
parent
e0d7ef9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
messageviewer/src/viewer/webengine/cidreferencesurlinterceptor/cidreferencesurlinterceptor.cpp
View file @
249c0301
...
...
@@ -37,10 +37,12 @@ bool CidReferencesUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &inf
{
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
));
if
(
info
.
resourceType
()
==
QWebEngineUrlRequestInfo
::
ResourceTypeImage
)
{
const
QString
newUrl
=
MessageViewer
::
WebEngineEmbedPart
::
self
()
->
contentUrl
(
urlRequestUrl
.
path
());
if
(
!
newUrl
.
isEmpty
())
{
info
.
redirect
(
QUrl
(
newUrl
));
}
}
}
return
false
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment