mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
AdBlockIcon: Remove unused popupBlocked
This commit is contained in:
parent
ff1171abf0
commit
ee02d7716a
|
@ -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());
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user