diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-11-21 02:12:25 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-11-21 02:12:25 +0100 |
commit | 4f5ac89ad5afdc6aa57e655b33ebed8ef87c1f23 (patch) | |
tree | 9063926929f11b472176540b1266f9cd85515173 /src/adblock/adblockmanager.cpp | |
parent | A new kcmshell named "webkit adblock" to set... (guess what?!) (diff) | |
download | rekonq-4f5ac89ad5afdc6aa57e655b33ebed8ef87c1f23.tar.xz |
Ok, same other bits on the adblock manager.
Now it's really time to go to bed :)
Diffstat (limited to 'src/adblock/adblockmanager.cpp')
-rw-r--r-- | src/adblock/adblockmanager.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp index 2d3feff7..6b2f9616 100644 --- a/src/adblock/adblockmanager.cpp +++ b/src/adblock/adblockmanager.cpp @@ -32,7 +32,9 @@ AdBlockManager::AdBlockManager(QObject *parent) : QObject(parent) + , _isAdblockEnabled(false) { + loadSettings(); } @@ -41,7 +43,28 @@ AdBlockManager::~AdBlockManager() } +void AdBlockManager::loadSettings() +{ +// KConfigGroup cg(_config, _group); +// groupBox->setChecked( cg.readEntry("Enabled", false) ); +// +// int num = cg.readEntry("Count", 0); +// for (int i = 0; i < num; ++i) +// { +// QString key = "Filter-" + QString::number(i); +// QString filter = cg.readEntry( key, QString() ); +// listWidget->addItem(filter); +// } +} + + bool AdBlockManager::isUrlAllowed(const QUrl &url) { + if (url.scheme() == QLatin1String("data")) + return false; + + if (!_isAdblockEnabled) + return false; + return true; -}
\ No newline at end of file +} |