1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

AdBlockIcon: Remove unused popupBlocked

This commit is contained in:
David Rosca 2018-01-06 13:08:57 +01:00
parent ff1171abf0
commit ee02d7716a
2 changed files with 0 additions and 21 deletions

View File

@ -58,25 +58,6 @@ QString AdBlockIcon::name() const
return tr("AdBlock Icon");
}
void AdBlockIcon::popupBlocked(const QString &ruleString, const QUrl &url)
{
int index = ruleString.lastIndexOf(QLatin1String(" ("));
const QString subscriptionName = ruleString.left(index);
const QString filter = ruleString.mid(index + 2, ruleString.size() - index - 3);
AdBlockSubscription* subscription = AdBlockManager::instance()->subscriptionByName(subscriptionName);
if (filter.isEmpty() || !subscription) {
return;
}
QPair<AdBlockRule*, QUrl> pair;
pair.first = new AdBlockRule(filter, subscription);
pair.second = url;
m_blockedPopups.append(pair);
mApp->desktopNotifications()->showNotification(QPixmap(":html/adblock_big.png"), tr("Blocked popup window"), tr("AdBlock blocked unwanted popup window."));
}
void AdBlockIcon::toggleCustomFilter()
{
QAction* action = qobject_cast<QAction*>(sender());

View File

@ -44,8 +44,6 @@ public:
QString id() const override;
QString name() const override;
void popupBlocked(const QString &ruleString, const QUrl &url);
private slots:
void toggleCustomFilter();