Shut down TabbedBrowser in MainWindow closeEvent.
Hopefully fixes #197.
This commit is contained in:
parent
0209382df4
commit
b4c7669e64
@ -638,12 +638,8 @@ class Application(QApplication):
|
||||
self.removeEventFilter(self._event_filter)
|
||||
except AttributeError:
|
||||
pass
|
||||
# Close all tabs
|
||||
for win_id in objreg.window_registry:
|
||||
log.destroy.debug("Closing tabs in window {}...".format(win_id))
|
||||
tabbed_browser = objreg.get('tabbed-browser', scope='window',
|
||||
window=win_id)
|
||||
tabbed_browser.shutdown()
|
||||
# Close all windows
|
||||
QApplication.closeAllWindows()
|
||||
# Shut down IPC
|
||||
try:
|
||||
objreg.get('ipc-server').shutdown()
|
||||
|
@ -333,3 +333,4 @@ class MainWindow(QWidget):
|
||||
e.accept()
|
||||
objreg.get('app').geometry = bytes(self.saveGeometry())
|
||||
log.destroy.debug("Closing window {}".format(self.win_id))
|
||||
self._tabbed_browser.shutdown()
|
||||
|
@ -264,6 +264,7 @@ class WebView(QWebView):
|
||||
"""Shut down the webview."""
|
||||
# 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()
|
||||
|
Loading…
Reference in New Issue
Block a user