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
Network
Konqueror
Commits
3fa0a699
Commit
3fa0a699
authored
Oct 04, 2021
by
Stefano Crocco
Committed by
David Faure
Oct 04, 2021
Browse files
Fix the location where adblock lists are saved
parent
a5de0e7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
webenginepart/src/settings/webenginesettings.cpp
View file @
3fa0a699
...
...
@@ -21,6 +21,7 @@
#include
<QWebEngineSettings>
#include
<QFontDatabase>
#include
<QFileInfo>
#include
<QDir>
QDataStream
&
operator
<<
(
QDataStream
&
ds
,
const
WebEngineSettings
::
WebFormInfo
&
info
)
{
...
...
@@ -335,7 +336,6 @@ void WebEngineSettings::init( KConfig * config, bool reset )
}
KConfigGroup
cgFilter
(
config
,
"Filter Settings"
);
if
((
reset
||
cgFilter
.
exists
())
&&
(
d
->
m_adFilterEnabled
=
cgFilter
.
readEntry
(
"Enabled"
,
false
)))
{
d
->
m_hideAdsEnabled
=
cgFilter
.
readEntry
(
"Shrink"
,
false
);
...
...
@@ -374,7 +374,9 @@ void WebEngineSettings::init( KConfig * config, bool reset )
if
(
filterEnabled
&&
url
.
isValid
())
{
/** determine where to cache HTMLFilterList file */
QString
localFile
=
cgFilter
.
readEntry
(
QStringLiteral
(
"HTMLFilterListLocalFilename-"
).
append
(
QString
::
number
(
id
)));
localFile
=
QStandardPaths
::
locate
(
QStandardPaths
::
ConfigLocation
,
"khtml/"
,
QStandardPaths
::
LocateDirectory
)
+
localFile
;
QString
dirName
=
QStandardPaths
::
writableLocation
(
QStandardPaths
::
CacheLocation
);
QDir
().
mkpath
(
dirName
);
localFile
=
dirName
+
'/'
+
localFile
;
/** determine existence and age of cache file */
QFileInfo
fileInfo
(
localFile
);
...
...
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