diff options
Diffstat (limited to 'src/browser.cpp')
-rw-r--r-- | src/browser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/browser.cpp b/src/browser.cpp index 7bf4adf..7295b56 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -27,6 +27,7 @@ #include <version.h> #include <web/profilemanager.h> #include <web/webprofile.h> +#include "webengine/filter.h" Browser::Browser(int &argc, char *argv[], bool allowSecondary) : SingleApplication(argc, argv, allowSecondary, SingleApplication::User | SingleApplication::SecondaryNotification | SingleApplication::ExcludeAppVersion) @@ -58,7 +59,8 @@ QPair<QString, WebProfile *> Browser::loadProfile(const QString &id) { WebProfile *profile = m_profileManager->loadProfile(id); connect(profile, &WebProfile::downloadRequested, m_downloads.get(), &DownloadsWidget::addDownload); - profile->setRequestInterceptor(m_urlFilter.get()); + auto *interceptor = new UrlRequestInterceptor(m_urlFilter.get(), profile, profile); + profile->setRequestInterceptor(interceptor); return QPair<QString, WebProfile *>(m_profileManager->id(profile), profile); } @@ -107,7 +109,7 @@ void Browser::setup() // downloads m_downloads = std::make_unique<DownloadsWidget>(m_config->value<QString>("downloads.path").value()); // url request filter - m_urlFilter = std::make_unique<UrlRequestInterceptor>(m_config); + m_urlFilter = std::make_unique<Filter>(m_config); // cookie request filter // load profiles |