From f1769d8b3ccf98046bcb3850a431a9541b4827c5 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 20 Jul 2017 12:42:32 +0200 Subject: [PATCH] Do not add EasyList by default. --- src/definitions/definitions.h | 1 + src/network-web/adblock/adblockmanager.cpp | 12 +----------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/definitions/definitions.h b/src/definitions/definitions.h index 7bf924d23..19020c331 100755 --- a/src/definitions/definitions.h +++ b/src/definitions/definitions.h @@ -26,6 +26,7 @@ #define ARGUMENTS_LIST_SEPARATOR "\n" +#define ADBLOCK_UPDATE_DAYS_INTERVAL 5 #define ADBLOCK_ICON_ACTIVE "adblock" #define ADBLOCK_ICON_DISABLED "adblock-disabled" #define IS_IN_ARRAY(offset, array) ((offset >= 0) && (offset < array.count())) diff --git a/src/network-web/adblock/adblockmanager.cpp b/src/network-web/adblock/adblockmanager.cpp index 3e5448464..dd38a2f5c 100755 --- a/src/network-web/adblock/adblockmanager.cpp +++ b/src/network-web/adblock/adblockmanager.cpp @@ -284,16 +284,6 @@ void AdBlockManager::load() { m_subscriptions.append(subscription); } - // Prepend EasyList if subscriptions are empty. - if (m_subscriptions.isEmpty()) { - AdBlockSubscription* easyList = new AdBlockSubscription(tr("EasyList"), this); - - easyList->setUrl(QUrl(ADBLOCK_EASYLIST_URL)); - easyList->setFilePath(storedListsPath() + QDir::separator() + QSL("easylist.txt")); - - m_subscriptions.prepend(easyList); - } - // Append CustomList. AdBlockCustomList *customList = new AdBlockCustomList(this); m_subscriptions.append(customList); @@ -308,7 +298,7 @@ void AdBlockManager::load() { connect(subscription, SIGNAL(subscriptionChanged()), this, SLOT(updateMatcher())); } - if (lastUpdate.addDays(5) < QDateTime::currentDateTime()) { + if (lastUpdate.addDays(ADBLOCK_UPDATE_DAYS_INTERVAL) < QDateTime::currentDateTime()) { QTimer::singleShot(1000 * 60, this, SLOT(updateAllSubscriptions())); }