Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 15107fa6 authored by Laurent Montel's avatar Laurent Montel 😁

update matcher

parent 39fe82d2
......@@ -209,8 +209,12 @@ AdBlockSubscription *AdblockManager::addSubscription(const QString &title, const
subscription->loadSubscription(mDisabledRules);
mSubscriptions.append(subscription);
// connect(subscription, SIGNAL(subscriptionUpdated()), mApp, SLOT(reloadUserStyleSheet()));
// connect(subscription, SIGNAL(subscriptionChanged()), this, SLOT(updateMatcher()));
connect(subscription, &AdBlockSubscription::subscriptionChanged, this, &AdblockManager::updateMatcher);
return subscription;
}
void AdblockManager::updateMatcher()
{
mAdBlockMatcher->update();
}
......@@ -57,6 +57,7 @@ public Q_SLOTS:
void reloadConfig();
private:
void updateMatcher();
void loadSubscriptions();
bool canRunOnScheme(const QString &scheme) const;
bool mEnabled;
......
......@@ -372,6 +372,14 @@ void AdBlockSettingWidget::slotRemoveSubscription()
QListWidgetItem *item = mUi->automaticFiltersListWidget->currentItem();
if (item) {
if (KMessageBox::questionYesNo(this, i18n("Do you want to delete list \"%1\"?", item->text()), i18n("Delete current list")) == KMessageBox::Yes) {
// void AdBlockDialog::removeSubscription()
// {
// if (m_manager->removeSubscription(m_currentSubscription)) {
// delete m_currentTreeWidget;
// }
// }
const QString path = item->data(PathList).toString();
if (!path.isEmpty()) {
if (!QFile(path).remove()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment