summaryrefslogtreecommitdiff
path: root/src/adblock
diff options
context:
space:
mode:
Diffstat (limited to 'src/adblock')
-rw-r--r--src/adblock/adblockmanager.cpp10
-rw-r--r--src/adblock/blockedelementswidget.cpp2
-rw-r--r--src/adblock/blockedelementswidget.h12
3 files changed, 15 insertions, 9 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp
index fca4ea03..967f103c 100644
--- a/src/adblock/adblockmanager.cpp
+++ b/src/adblock/adblockmanager.cpp
@@ -220,7 +220,7 @@ void AdBlockManager::loadRuleString(const QString &stringRule)
_blackList << rule;
}
-
+
QNetworkReply *AdBlockManager::block(const QNetworkRequest &request, WebPage *page)
{
if (!_isAdblockEnabled)
@@ -404,7 +404,7 @@ void AdBlockManager::addCustomRule(const QString &stringRule, bool reloadPage)
out << stringRule << '\n';
ruleFile.close();
-
+
// load it
loadRuleString(stringRule);
@@ -427,14 +427,14 @@ void AdBlockManager::showBlockedItemDialog()
dialog->setMainWidget(&widget);
dialog->exec();
- Q_FOREACH(const QString &r, widget.rulesToAdd())
+ Q_FOREACH(const QString & r, widget.rulesToAdd())
{
addCustomRule(r);
}
-
+
if (widget.pageNeedsReload())
emit reloadCurrentPage();
-
+
dialog->deleteLater();
}
diff --git a/src/adblock/blockedelementswidget.cpp b/src/adblock/blockedelementswidget.cpp
index b0e18c39..141dd203 100644
--- a/src/adblock/blockedelementswidget.cpp
+++ b/src/adblock/blockedelementswidget.cpp
@@ -111,6 +111,6 @@ void BlockedElementsWidget::unblockElement()
_rulesToAdd << urlString;
}
-
+
_reloadPage = true;
}
diff --git a/src/adblock/blockedelementswidget.h b/src/adblock/blockedelementswidget.h
index c796be87..d26ee849 100644
--- a/src/adblock/blockedelementswidget.h
+++ b/src/adblock/blockedelementswidget.h
@@ -48,10 +48,16 @@ public:
void setBlockedElements(const QStringList &);
void setHidedElements(int);
- bool pageNeedsReload() { return _reloadPage; };
+ bool pageNeedsReload()
+ {
+ return _reloadPage;
+ };
+
+ QStringList rulesToAdd()
+ {
+ return _rulesToAdd;
+ };
- QStringList rulesToAdd() { return _rulesToAdd; };
-
private Q_SLOTS:
void unblockElement();