diff options
author | Florian Bruhin <git@the-compiler.org> | 2018-03-05 07:39:36 +0100 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2018-03-05 07:39:36 +0100 |
commit | 2a9d970641f2755f5b27a7e37ea46cb9babe1dd8 (patch) | |
tree | 33341fa84e88587dec6dba0b0c74463912fbc01c | |
parent | 274f2a9d199684120ec0c66e805410a3a920fb46 (diff) | |
download | qutebrowser-2a9d970641f2755f5b27a7e37ea46cb9babe1dd8.tar.gz qutebrowser-2a9d970641f2755f5b27a7e37ea46cb9babe1dd8.zip |
Uninstall application proxy factory before exit
This should help with segfaults on exit.
Fixes #3657
-rw-r--r-- | qutebrowser/app.py | 2 | ||||
-rw-r--r-- | qutebrowser/browser/network/proxy.py | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 73b5557cc..e9f9d2229 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -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() diff --git a/qutebrowser/browser/network/proxy.py b/qutebrowser/browser/network/proxy.py index 96be78742..d3e25c23c 100644 --- a/qutebrowser/browser/network/proxy.py +++ b/qutebrowser/browser/network/proxy.py @@ -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.""" |