From ee02d7716aa8ed2bbfeb154adbf785f8ec648971 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 6 Jan 2018 13:08:57 +0100 Subject: [PATCH] AdBlockIcon: Remove unused popupBlocked --- src/lib/adblock/adblockicon.cpp | 19 ------------------- src/lib/adblock/adblockicon.h | 2 -- 2 files changed, 21 deletions(-) diff --git a/src/lib/adblock/adblockicon.cpp b/src/lib/adblock/adblockicon.cpp index dd430b170..ccd7c1ee1 100644 --- a/src/lib/adblock/adblockicon.cpp +++ b/src/lib/adblock/adblockicon.cpp @@ -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 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(sender()); diff --git a/src/lib/adblock/adblockicon.h b/src/lib/adblock/adblockicon.h index e794cb2c8..5b75294f4 100644 --- a/src/lib/adblock/adblockicon.h +++ b/src/lib/adblock/adblockicon.h @@ -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();