Uninstall application proxy factory before exit

This should help with segfaults on exit.
Fixes #3657
This commit is contained in:
Florian Bruhin 2018-03-05 07:39:36 +01:00
parent 274f2a9d19
commit 2a9d970641
2 changed files with 6 additions and 0 deletions

View File

@ -772,6 +772,8 @@ class Quitter:
pre_text="Error while saving {}".format(key))
# Disable storage so removing tempdir will work
websettings.shutdown()
# Disable application proxy factory to fix segfaults with Qt 5.10.1
proxy.shutdown()
# Re-enable faulthandler to stdout, then remove crash log
log.destroy.debug("Deactivating crash log...")
objreg.get('crash-handler').destroy_crashlogfile()

View File

@ -34,6 +34,10 @@ def init():
QNetworkProxyFactory.setApplicationProxyFactory(proxy_factory)
def shutdown():
QNetworkProxyFactory.setApplicationProxyFactory(None)
class ProxyFactory(QNetworkProxyFactory):
"""Factory for proxies to be used by qutebrowser."""