[QtWebKit 2.3] Enable 3rd party cookie policy.

remotes/origin/falkon
nowrep 13 years ago
parent 6bf53c0332
commit a0203c3fbb
  1. 5
      src/lib/cookies/cookiejar.cpp
  2. 2
      src/lib/other/useragentmanager.cpp

@ -24,6 +24,7 @@
#include <QWebSettings>
#include <QDateTime>
#include <QDebug>
#include <QWebPage> // QTWEBKIT_VERSION_CHECK macro
//#define COOKIE_DEBUG
@ -97,7 +98,7 @@ void CookieJar::loadSettings()
m_blacklist = settings.value("blacklist", QStringList()).toStringList();
settings.endGroup();
#if QT_VERSION >= 0x050000
#if QT_VERSION >= 0x050000 || (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 3, 0))
mApp->webSettings()->setThirdPartyCookiePolicy(m_blockThirdParty ?
QWebSettings::AlwaysBlockThirdPartyCookies :
QWebSettings::AlwaysAllowThirdPartyCookies);
@ -136,7 +137,7 @@ bool CookieJar::rejectCookie(const QString &domain, const QNetworkCookie &cookie
}
// This feature is now natively in QtWebKit in Qt 5
#if QT_VERSION < 0x050000
#if QT_VERSION < 0x050000 && (QTWEBKIT_VERSION < QTWEBKIT_VERSION_CHECK(2, 3, 0))
if (m_blockThirdParty) {
bool result = blockThirdParty(cookieDomain, domain);
if (result) {

@ -20,6 +20,8 @@
#include "globalfunctions.h"
#include "settings.h"
#include <QWebPage> // QTWEBKIT_VERSION_CHECK macro
UserAgentManager::UserAgentManager()
{
m_fakeUserAgent = QString("Mozilla/5.0 (%1) AppleWebKit/%2 (KHTML, like Gecko) Chrome/10.0 Safari/%2").arg(qz_buildSystem(), QupZilla::WEBKITVERSION);

Loading…
Cancel
Save