mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-19 10:16:34 +01:00
AdBlock: Fix issue when enabling rule didn't work until restart.
When attempting to enable rule that was already disabled on startup, it won't have an effect until completely restarting the browser.
This commit is contained in:
parent
2abefeaf79
commit
5fbf11c8f2
@ -9,6 +9,7 @@ Version 1.5.0
|
||||
* added KWallet password backend plugin
|
||||
* added Gnome-Keyring password backend plugin
|
||||
* added StatusBar Icons plugin that adds extra icons to statusbar
|
||||
* great performance improvement for matching basic rules in AdBlock
|
||||
* themes can now be loaded from profile directories
|
||||
* pagescreen can now save output into number of formats, including PDF
|
||||
* proxy exceptions now supports wildcards (*, ?)
|
||||
@ -23,6 +24,7 @@ Version 1.5.0
|
||||
* fixed: size of preferences dialog on low-res screens
|
||||
* fixed: loading plugins with relative paths in portable build
|
||||
* fixed: displaying a lot of RSS feeds in RSS widget in locationbar
|
||||
* fixed: enabling disabled rules in AdBlock now works everytime
|
||||
|
||||
Version 1.4.4
|
||||
* released 1 September 2013
|
||||
|
@ -361,7 +361,10 @@ void AdBlockRule::parseFilter()
|
||||
|
||||
// Empty rule or just comment
|
||||
if (m_filter.trimmed().isEmpty() || m_filter.startsWith(QLatin1Char('!'))) {
|
||||
// We want to differentiate rule disabled by user and rule disabled in subscription file
|
||||
// m_isInternalDisabled is also used when rule is disabled due to all options not being supported
|
||||
m_isEnabled = false;
|
||||
m_isInternalDisabled = true;
|
||||
m_type = Invalid;
|
||||
return;
|
||||
}
|
||||
|
@ -392,11 +392,19 @@ void AdBlockSubscription::populateCache()
|
||||
int count = m_rules.count();
|
||||
for (int i = 0; i < count; ++i) {
|
||||
const AdBlockRule* rule = m_rules.at(i);
|
||||
if (!rule->isEnabled()) {
|
||||
|
||||
// Don't add internally disabled rules to cache
|
||||
if (rule->isInternalDisabled()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (rule->isCssRule()) {
|
||||
// We will add only enabled css rules to cache, because there is no enabled/disabled
|
||||
// check on match. They are directly embedded to pages.
|
||||
if (!rule->isEnabled()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (rule->isDomainRestricted()) {
|
||||
m_domainRestrictedCssRules.append(rule);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user