Commit 2f3ecf5d authored by Laurent Montel's avatar Laurent Montel 😁

Add list of subscription

parent 6dc1a8ea
......@@ -95,3 +95,8 @@ bool AdblockManager::canRunOnScheme(const QString &scheme) const
{
return (scheme != QLatin1String("file"));
}
QList<AdBlockSubscription *> AdblockManager::subscriptions() const
{
return mSubscriptions;
}
......@@ -26,6 +26,7 @@
namespace AdBlock
{
class AdBlockMatcher;
class AdBlockSubscription;
class ADBLOCKLIB_EXPORT AdblockManager : public QObject
{
Q_OBJECT
......@@ -37,6 +38,8 @@ public:
bool interceptRequest(const QWebEngineUrlRequestInfo &info);
QList<AdBlockSubscription *> subscriptions() const;
Q_SIGNALS:
void enabledChanged(bool);
......@@ -47,6 +50,7 @@ private:
bool canRunOnScheme(const QString &scheme) const;
bool mEnabled;
AdBlockMatcher *mAdBlockMatcher;
QList<AdBlockSubscription *> mSubscriptions;
};
}
#endif // ADBLOCKMANAGER_H
......@@ -158,8 +158,8 @@ void AdBlockMatcher::update()
QHash<QString, const AdBlockRule *> cssRulesHash;
QVector<const AdBlockRule *> exceptionCssRules;
#if 0 //FIXME
foreach (AdBlockSubscription *subscription, m_manager->subscriptions()) {
foreach (const AdBlockRule *rule, subscription->allRules()) {
Q_FOREACH (AdBlockSubscription *subscription, m_manager->subscriptions()) {
Q_FOREACH (const AdBlockRule *rule, subscription->allRules()) {
// Don't add internally disabled rules to cache
if (rule->isInternalDisabled()) {
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment