diff options
Diffstat (limited to 'src/adblock/adblockmanager.cpp')
-rw-r--r-- | src/adblock/adblockmanager.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp index e195c705..48e2369d 100644 --- a/src/adblock/adblockmanager.cpp +++ b/src/adblock/adblockmanager.cpp @@ -56,6 +56,9 @@ AdBlockManager::AdBlockManager(QObject *parent) AdBlockManager::~AdBlockManager() { + _whiteList.clear(); + _blackList.clear(); + _hideList.clear(); } @@ -77,9 +80,9 @@ void AdBlockManager::loadSettings(bool checkUpdateDate) // just to be sure.. _isHideAdsEnabled = ReKonfig::hideAdsEnabled(); - - // local settings - KSharedConfig::Ptr config = KGlobal::config(); + + // read settings + KSharedConfig::Ptr config = KSharedConfig::openConfig("adblock", KConfig::SimpleConfig, "appdata"); KConfigGroup rulesGroup(config, "rules"); QStringList rules; rules = rulesGroup.readEntry("local-rules" , QStringList()); @@ -303,7 +306,7 @@ void AdBlockManager::saveRules(const QStringList &rules) QStringList titles = ReKonfig::subscriptionTitles(); QString title = titles.at(_index) + "-rules"; - KSharedConfig::Ptr config = KGlobal::config(); + KSharedConfig::Ptr config = KSharedConfig::openConfig("adblock", KConfig::SimpleConfig, "appdata"); KConfigGroup cg(config , "rules"); cg.writeEntry(title, cleanedRules); } |