Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
d74c0b15
Commit
d74c0b15
authored
Nov 19, 2020
by
Ahmad Samir
Committed by
Kurt Hindenburg
Dec 02, 2020
Browse files
Fix if condition when updating filters
We want to delete the _escapedUrlFilter if allowEscapedLinks() is false.
parent
11987c7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/session/SessionController.cpp
View file @
d74c0b15
...
...
@@ -1304,14 +1304,15 @@ void SessionController::updateFilterList(const Profile::Ptr &profile)
filterChain
->
addFilter
(
_urlFilter
);
}
const
bool
allowEscapeSequenceLinks
=
profile
->
allowEscapedLinks
();
if
(
allowEscapeSequenceLinks
&&
(
_escapedUrlFilter
!=
nullptr
))
{
if
(
profile
->
allowEscapedLinks
())
{
if
(
_escapedUrlFilter
==
nullptr
)
{
_escapedUrlFilter
=
new
EscapeSequenceUrlFilter
(
_sessionDisplayConnection
->
session
(),
_sessionDisplayConnection
->
view
());
filterChain
->
addFilter
(
_escapedUrlFilter
);
}
}
else
if
(
_escapedUrlFilter
!=
nullptr
)
{
// Became disabled, clean up
filterChain
->
removeFilter
(
_escapedUrlFilter
);
delete
_escapedUrlFilter
;
_escapedUrlFilter
=
nullptr
;
}
else
if
(
allowEscapeSequenceLinks
&&
_escapedUrlFilter
==
nullptr
)
{
_escapedUrlFilter
=
new
EscapeSequenceUrlFilter
(
_sessionDisplayConnection
->
session
(),
_sessionDisplayConnection
->
view
());
filterChain
->
addFilter
(
_escapedUrlFilter
);
}
const
bool
allowColorFilters
=
profile
->
colorFilterEnabled
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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