webEngineSettingsPointer = webEngineViewPointer->settings();
webEngineCookieStorePointer = webEngineProfilePointer->cookieStore();
- // Store a copy of each cookie when it is added.
+ // Process cookie changes.
connect(webEngineCookieStorePointer, SIGNAL(cookieAdded(QNetworkCookie)), this, SLOT(cookieAdded(QNetworkCookie)));
+ connect(webEngineCookieStorePointer, SIGNAL(cookieRemoved(QNetworkCookie)), this, SLOT(cookieRemoved(QNetworkCookie)));
// Store a copy of the WebEngine default user agent.
webEngineDefaultUserAgent = webEngineProfilePointer->httpUserAgent();
emit addCookie(cookie);
}
+void BrowserView::cookieRemoved(const QNetworkCookie &cookie) const
+{
+ // Remove the cookie from the cookie list.
+ emit removeCookie(cookie);
+}
+
void BrowserView::deleteAllCookies() const
{
// Delete all the cookies.
webEngineCookieStorePointer->deleteAllCookies();
}
+void BrowserView::deleteCookieFromStore(const QNetworkCookie &cookie) const
+{
+ // Delete the cookie.
+ webEngineCookieStorePointer->deleteCookie(cookie);
+}
+
void BrowserView::forward() const
{
// Go forward.