1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-24 04:36:34 +01:00

CookieManager: Hide filter 3rd party cookies option

It's impossible to implement with current QtWebEngine API.
This commit is contained in:
David Rosca 2017-01-27 19:28:30 +01:00
parent 43eb307e2d
commit a634a17af0
2 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,6 @@
/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
* QupZilla - Qt web browser
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -127,6 +127,8 @@ bool CookieJar::acceptCookie(const QUrl &firstPartyUrl, const QByteArray &cookie
bool CookieJar::rejectCookie(const QString &domain, const QNetworkCookie &cookie, const QString &cookieDomain) const
{
Q_UNUSED(domain)
if (!m_allowCookies) {
bool result = listMatchesDomain(m_whitelist, cookieDomain);
if (!result) {
@ -147,6 +149,7 @@ bool CookieJar::rejectCookie(const QString &domain, const QNetworkCookie &cookie
}
}
#if QTWEBENGINE_DISABLED
if (m_filterThirdParty) {
bool result = matchDomain(cookieDomain, domain);
if (!result) {
@ -156,6 +159,7 @@ bool CookieJar::rejectCookie(const QString &domain, const QNetworkCookie &cookie
return true;
}
}
#endif
if (m_filterTrackingCookie && cookie.name().startsWith("__utm")) {
#ifdef COOKIE_DEBUG

View File

@ -1,6 +1,6 @@
/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
* QupZilla - Qt web browser
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -75,6 +75,9 @@ CookieManager::CookieManager()
ui->blackList->addItems(settings.value("blacklist", QStringList()).toStringList());
settings.endGroup();
// QTWEBENGINE_DISABLED
ui->filter3rdParty->hide();
ui->search->setPlaceholderText(tr("Search"));
ui->cookieTree->setDefaultItemShowMode(TreeWidget::ItemsCollapsed);
ui->cookieTree->sortItems(0, Qt::AscendingOrder);