mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
AdBlock: Fix updating rules when adding/removing subscriptions
This also fixes crash on first network request after removing subscription
This commit is contained in:
parent
7391a6403c
commit
53bf6662dc
@ -200,6 +200,8 @@ AdBlockSubscription* AdBlockManager::addSubscription(const QString &title, const
|
||||
subscription->loadSubscription(m_disabledRules);
|
||||
|
||||
m_subscriptions.insert(m_subscriptions.count() - 1, subscription);
|
||||
connect(subscription, SIGNAL(subscriptionUpdated()), mApp, SLOT(reloadUserStyleSheet()));
|
||||
connect(subscription, SIGNAL(subscriptionChanged()), m_matcher, SLOT(update()));
|
||||
|
||||
return subscription;
|
||||
}
|
||||
@ -213,7 +215,9 @@ bool AdBlockManager::removeSubscription(AdBlockSubscription* subscription)
|
||||
QFile(subscription->filePath()).remove();
|
||||
m_subscriptions.removeOne(subscription);
|
||||
|
||||
m_matcher->update();
|
||||
delete subscription;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user