diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-08-19 01:18:17 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-08-19 01:18:17 +0200 |
commit | b56648b2d624ad5933bbfae0dcac6f65bb96bd3b (patch) | |
tree | e86423eb28a17d5c2e3c9d977ebd05026767d962 /src/adblock/adblockmanager.cpp | |
parent | fixes wrong comment in rekonqui.rc that could lead to a parsing error that le... (diff) | |
download | rekonq-b56648b2d624ad5933bbfae0dcac6f65bb96bd3b.tar.xz |
Fix saving in adblock management
This original patch from fritz_van_tom has been modified by me
to fix a couple of "obsoleted" things not removed in the
previous changes.
My fault for them (and for the need of this patch), sorry.
REVIEW: 102362
Diffstat (limited to 'src/adblock/adblockmanager.cpp')
-rw-r--r-- | src/adblock/adblockmanager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp index ff09fdc7..40e23d5f 100644 --- a/src/adblock/adblockmanager.cpp +++ b/src/adblock/adblockmanager.cpp @@ -52,6 +52,7 @@ AdBlockManager::AdBlockManager(QObject *parent) , _isHideAdsEnabled(false) , _index(0) { + loadSettings(); } @@ -180,7 +181,6 @@ QNetworkReply *AdBlockManager::block(const QNetworkRequest &request, WebPage *pa const QString host = request.url().host(); // check white rules before :) - if (_hostWhiteList.match(host)) { kDebug() << "****ADBLOCK: WHITE RULE (@@) Matched by host matcher: ***********"; @@ -369,10 +369,12 @@ void AdBlockManager::showSettings() { QPointer<KDialog> dialog = new KDialog(); dialog->setCaption(i18nc("@title:window", "Ad Block Settings")); - dialog->setButtons(KDialog::Ok); + dialog->setButtons(KDialog::Ok | KDialog::Cancel); AdBlockWidget widget; dialog->setMainWidget(&widget); + connect(dialog, SIGNAL(okClicked()), &widget, SLOT(save())); + connect(dialog, SIGNAL(okClicked()), this, SLOT(loadSettings())); dialog->exec(); dialog->deleteLater(); |