Ensure the QWebEngineProfile has a parent

This commit is contained in:
Kovid Goyal 2018-12-14 07:09:17 +05:30
parent a3ac8282d4
commit 46c646e49d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -170,7 +170,9 @@ class ViewerBridge(Bridge):
class WebPage(QWebEnginePage):
def __init__(self, parent):
QWebEnginePage.__init__(self, create_profile(), parent)
profile = create_profile()
QWebEnginePage.__init__(self, profile, parent)
profile.setParent(self)
secure_webengine(self, for_viewer=True)
self.bridge = ViewerBridge(self)