Add a workaround to save cookies on exit

Fixes #2263
This commit is contained in:
Florian Bruhin 2017-02-06 20:37:29 +01:00
parent b8b4611b4d
commit 8d55d093f2
2 changed files with 8 additions and 2 deletions

View File

@ -57,6 +57,8 @@ Fixed
- Crash reports are now re-enabled when using QtWebEngine
- Fixed crashes when closing tabs while hinting
- Fixed starting on newer PyQt/sip versions with LibreSSL
- Worked around a Qt bug which caused cookies newer than 30s not to be saved on
exit with QtWebEngine.
v0.9.1
------

View File

@ -26,6 +26,7 @@ Module attributes:
import os
from PyQt5.QtNetwork import QNetworkCookie
# pylint: disable=no-name-in-module,import-error,useless-suppression
from PyQt5.QtWebEngineWidgets import (QWebEngineSettings, QWebEngineProfile,
QWebEngineScript)
@ -171,8 +172,11 @@ def init(args):
def shutdown():
# FIXME:qtwebengine do we need to do something for a clean shutdown here?
pass
# WORKAROUND for https://bugreports.qt.io/browse/QTBUG-58675
# This forces Chromium to flush its cookie store but doesn't actually
# delete anything.
cookie = QNetworkCookie()
QWebEngineProfile.defaultProfile().cookieStore().deleteCookie(cookie)
# Missing QtWebEngine attributes: