Fix QIODevice warnings when closing tabs.

This is a regression introduced in 43c9d69295.
Fixes #517.
This commit is contained in:
Florian Bruhin 2015-02-20 07:43:40 +01:00
parent 14f2420500
commit 634028e277

View File

@ -306,13 +306,13 @@ class WebView(QWebView):
def shutdown(self):
"""Shut down the webview."""
self.shutting_down.emit()
self.page().shutdown()
# We disable javascript because that prevents some segfaults when
# quitting it seems.
log.destroy.debug("Shutting down {!r}.".format(self))
settings = self.settings()
settings.setAttribute(QWebSettings.JavascriptEnabled, False)
self.stop()
self.page().shutdown()
def openurl(self, url):
"""Open a URL in the browser.