diff options
Diffstat (limited to 'src/browser.cpp')
-rw-r--r-- | src/browser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/browser.cpp b/src/browser.cpp index 25fcf59..8b7f40f 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -9,7 +9,6 @@ #include "browser.h" #include "mainwindow.h" #include "webengine/urlinterceptor.h" -#include <QDir> #include <QtConcurrent> #include <bookmarks/bookmarkswidget.h> #include <downloads/downloadswidget.h> @@ -45,6 +44,7 @@ void Browser::setConfiguration(std::shared_ptr<Configuration> &config) m_downloadManager = std::make_shared<DownloadsWidget>(QString::fromStdString(m_config->value<std::string>("downloads.path").value())); m_urlRequestInterceptor = std::make_shared<UrlRequestInterceptor>(QString::fromStdString(m_config->value<std::string>("filter.path").value())); + m_cookieInterceptor = std::make_shared<CookieInterceptor>(""); // set default profile m_defaultProfile = profile(QString::fromStdString(m_config->value<std::string>("browser.profile").value())); @@ -118,6 +118,7 @@ std::shared_ptr<WebEngineProfile> Browser::profile(const QString storageName) const QString &path = QString::fromStdString(m_config->value<std::string>("profile.path").value()); std::shared_ptr<WebEngineProfile> _profile = std::shared_ptr<WebEngineProfile>(createProfile(storageName, path, nullptr)); _profile->setRequestInterceptor(m_urlRequestInterceptor.get()); + _profile->setCookieInterceptor(m_cookieInterceptor.get()); connect(_profile.get(), &WebEngineProfile::downloadRequested, m_downloadManager.get(), &DownloadsWidget::addDownload); m_profiles.insert(storageName, _profile); |