Changeset View
Changeset View
Standalone View
Standalone View
webenginepart/src/webenginepartcookiejar.cpp
Show All 19 Lines | |||||
20 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
21 | * Boston, MA 02110-1301, USA. | 21 | * Boston, MA 02110-1301, USA. | ||
22 | * | 22 | * | ||
23 | */ | 23 | */ | ||
24 | 24 | | |||
25 | #include "webenginepartcookiejar.h" | 25 | #include "webenginepartcookiejar.h" | ||
26 | #include "settings/webenginesettings.h" | 26 | #include "settings/webenginesettings.h" | ||
27 | 27 | | |||
28 | #include <QtWebEngine/QtWebEngineVersion> | | |||
29 | #include <QWebEngineProfile> | 28 | #include <QWebEngineProfile> | ||
30 | #include <QWebEngineCookieStore> | 29 | #include <QWebEngineCookieStore> | ||
31 | #include <QStringList> | 30 | #include <QStringList> | ||
32 | #include <QDBusInterface> | 31 | #include <QDBusInterface> | ||
33 | #include <QDBusReply> | 32 | #include <QDBusReply> | ||
34 | #include <QDebug> | 33 | #include <QDebug> | ||
35 | #include <QWidget> | 34 | #include <QWidget> | ||
36 | #include <QDateTime> | 35 | #include <QDateTime> | ||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 75 | #if QTWEBENGINE_VERSION >= QT_VERSION_CHECK(5,11,0) | |||
78 | m_cookieStore->setCookieFilter(filter); | 77 | m_cookieStore->setCookieFilter(filter); | ||
79 | #endif //QTWEBENGINE_VERSION >= QT_VERSION_CHECK(5,11,0) | 78 | #endif //QTWEBENGINE_VERSION >= QT_VERSION_CHECK(5,11,0) | ||
80 | } | 79 | } | ||
81 | 80 | | |||
82 | WebEnginePartCookieJar::~WebEnginePartCookieJar() | 81 | WebEnginePartCookieJar::~WebEnginePartCookieJar() | ||
83 | { | 82 | { | ||
84 | } | 83 | } | ||
85 | 84 | | |||
85 | #if QTWEBENGINE_VERSION >= QT_VERSION_CHECK(5,11,0) | ||||
86 | bool WebEnginePartCookieJar::filterCookie(const QWebEngineCookieStore::FilterRequest& req) | 86 | bool WebEnginePartCookieJar::filterCookie(const QWebEngineCookieStore::FilterRequest& req) | ||
87 | { | 87 | { | ||
88 | return WebEngineSettings::self()->acceptCrossDomainCookies() || !req.thirdParty; | 88 | return WebEngineSettings::self()->acceptCrossDomainCookies() || !req.thirdParty; | ||
89 | } | 89 | } | ||
90 | #endif //QTWEBENGINE_VERSION >= QT_VERSION_CHECK(5,11,0) | ||||
90 | 91 | | |||
91 | void WebEnginePartCookieJar::deleteSessionCookies() | 92 | void WebEnginePartCookieJar::deleteSessionCookies() | ||
92 | { | 93 | { | ||
93 | if (!m_cookieServer.isValid()) { | 94 | if (!m_cookieServer.isValid()) { | ||
94 | return; | 95 | return; | ||
95 | } | 96 | } | ||
96 | foreach(qlonglong id, m_windowsWithSessionCookies) { | 97 | foreach(qlonglong id, m_windowsWithSessionCookies) { | ||
97 | m_cookieServer.call(QDBus::NoBlock, "deleteSessionCookies", id); | 98 | m_cookieServer.call(QDBus::NoBlock, "deleteSessionCookies", id); | ||
▲ Show 20 Lines • Show All 227 Lines • Show Last 20 Lines |