diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-04-13 14:37:22 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-04-13 14:37:22 +0200 |
commit | 00c7087a6dcaec455f296a9e5fdb534ffd31553a (patch) | |
tree | cb684a62301a50f9dd60fe66669133e29519c3c6 /src/browser.cpp | |
parent | Fix for setCookieFilter signature change in Qt5.11beta3 (diff) | |
download | smolbote-00c7087a6dcaec455f296a9e5fdb534ffd31553a.tar.xz |
Branch of Qt5.11 features
Diffstat (limited to 'src/browser.cpp')
-rw-r--r-- | src/browser.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/browser.cpp b/src/browser.cpp index 5a35a9e..c32aee7 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -35,7 +35,6 @@ Browser::~Browser() qDebug("Thread pool is done: %s", QThreadPool::globalInstance()->waitForDone() ? "okay" : "failed"); delete m_urlRequestInterceptor; - delete m_cookieInterceptor; } void Browser::setConfiguration(std::shared_ptr<Configuration> &config) @@ -64,9 +63,6 @@ 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 = new UrlRequestInterceptor(QString::fromStdString(m_config->value<std::string>("filter.path").value())); - m_cookieInterceptor = new CookieFilter( - m_config->value<bool>("filter.cookies.block.all").value(), - m_config->value<bool>("filter.cookies.block.thirdParty").value()); // set default profile m_defaultProfile = profile(QString::fromStdString(m_config->value<std::string>("browser.profile").value())); @@ -154,10 +150,6 @@ std::shared_ptr<WebEngineProfile> Browser::profile(const QString &storageName) } _profile->setRequestInterceptor(m_urlRequestInterceptor); - _profile->cookieStore()->setCookieFilter([this](const QWebEngineCookieStore::FilterRequest &request) { - // If the cookie access is to be accepted, the filter function should return true; otherwise it should return false. - return !m_cookieInterceptor->shouldBlock(request); - }); connect(_profile.get(), &WebEngineProfile::downloadRequested, m_downloadManager.get(), &DownloadsWidget::addDownload); |