From e88e9a66dabba229d037aa91458c189b22c63a16 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 27 Oct 2015 07:40:16 +0100 Subject: [PATCH] Fix deleting of --temp-basedir on Windows. Before it couldn't get deleted because Qt still kept the icon database open in some way. By clearing it when shutting down, this works correctly. Fixes #1017. --- qutebrowser/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index abdba799e..076108097 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -32,6 +32,7 @@ import datetime import tokenize from PyQt5.QtWidgets import QApplication +from PyQt5.QtWebKit import QWebSettings from PyQt5.QtGui import QDesktopServices, QPixmap, QIcon, QCursor, QWindow from PyQt5.QtCore import (pyqtSlot, qInstallMessageHandler, QTimer, QUrl, QObject, Qt, QEvent) @@ -691,6 +692,8 @@ class Quitter: error.handle_fatal_exc( e, self._args, "Error while saving!", pre_text="Error while saving {}".format(key)) + # Disable favicons so removing tempdir will work + QWebSettings.setIconDatabasePath("") # Re-enable faulthandler to stdout, then remove crash log log.destroy.debug("Deactivating crash log...") objreg.get('crash-handler').destroy_crashlogfile()