aboutsummaryrefslogtreecommitdiff
path: root/staging/adblock/rule.h
diff options
context:
space:
mode:
Diffstat (limited to 'staging/adblock/rule.h')
-rw-r--r--staging/adblock/rule.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/staging/adblock/rule.h b/staging/adblock/rule.h
index 26a8249..aaab49a 100644
--- a/staging/adblock/rule.h
+++ b/staging/adblock/rule.h
@@ -17,8 +17,6 @@
namespace AdblockPlus
{
-static const QString defaultUrl;
-
class Rule
{
public:
@@ -29,8 +27,8 @@ public:
* firstPartyUrl: URL of the page that issued the request
*/
virtual bool hasMatch(const QStringRef &requestUrl,
- const QStringRef &initiatorUrl = QStringRef(&defaultUrl),
- const QStringRef &firstPartyUrl = QStringRef(&defaultUrl),
+ const QStringRef &initiatorUrl,
+ const QStringRef &firstPartyUrl,
QWebEngineUrlRequestInfo::ResourceType resourceType = QWebEngineUrlRequestInfo::ResourceTypeMainFrame) const = 0;
bool shouldRedirect() const
@@ -84,8 +82,8 @@ public:
~MatcherRule() = default;
bool hasMatch(const QStringRef &url,
- const QStringRef &initiatorUrl = QStringRef(&defaultUrl),
- const QStringRef &firstPartyUrl = QStringRef(&defaultUrl),
+ const QStringRef &initiatorUrl,
+ const QStringRef &firstPartyUrl,
QWebEngineUrlRequestInfo::ResourceType resourceType = QWebEngineUrlRequestInfo::ResourceTypeMainFrame) const override
{
const auto index = matcher.indexIn(url);
@@ -138,8 +136,8 @@ public:
~RegexRule() = default;
bool hasMatch(const QStringRef &url,
- const QStringRef &initiatorUrl = QStringRef(&defaultUrl),
- const QStringRef &firstPartyUrl = QStringRef(&defaultUrl),
+ const QStringRef &initiatorUrl,
+ const QStringRef &firstPartyUrl,
QWebEngineUrlRequestInfo::ResourceType resourceType = QWebEngineUrlRequestInfo::ResourceTypeMainFrame) const override
{
const auto match = regex.match(url);