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
08205949
Commit
08205949
authored
Feb 18, 2021
by
Laurent Montel
Browse files
Emit url blocked (we will used it in remote-content support)
parent
0d598e65
Pipeline
#51407
passed with stage
in 42 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
messageviewer/src/viewer/webengine/loadexternalreferencesurlinterceptor/loadexternalreferencesurlinterceptor.cpp
View file @
08205949
...
...
@@ -29,6 +29,7 @@ bool LoadExternalReferencesUrlInterceptor::interceptRequest(QWebEngineUrlRequest
return
false
;
}
else
{
if
(
info
.
resourceType
()
==
QWebEngineUrlRequestInfo
::
ResourceTypeImage
&&
!
info
.
requestUrl
().
isLocalFile
()
&&
(
scheme
!=
QLatin1String
(
"cid"
)))
{
Q_EMIT
urlBlocked
(
info
.
requestUrl
());
return
true
;
}
else
if
(
info
.
resourceType
()
==
QWebEngineUrlRequestInfo
::
ResourceTypeFontResource
)
{
return
true
;
...
...
messageviewer/src/viewer/webengine/loadexternalreferencesurlinterceptor/loadexternalreferencesurlinterceptor.h
View file @
08205949
...
...
@@ -21,6 +21,9 @@ public:
void
setAllowExternalContent
(
bool
b
);
Q_REQUIRED_RESULT
bool
allowExternalContent
()
const
;
Q_SIGNALS:
void
urlBlocked
(
const
QUrl
&
url
);
private:
bool
mAllowLoadExternalReference
=
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