summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2018-03-06 07:38:01 +0100
committerFlorian Bruhin <git@the-compiler.org>2018-03-06 07:38:01 +0100
commitc9cd47b5b11bb23c043df7f997038dc7a085ee6e (patch)
tree564e7c654341737f04c9893dc30f84e5269874e6
parent41dfa296483954e3f4eaf3285b9688b318211861 (diff)
downloadqutebrowser-c9cd47b5b11bb23c043df7f997038dc7a085ee6e.tar.gz
qutebrowser-c9cd47b5b11bb23c043df7f997038dc7a085ee6e.zip
Also clear favicons when possible with QtWebEngine
See #3469
-rw-r--r--qutebrowser/browser/webengine/webenginetab.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py
index 170650351..c9e58e69e 100644
--- a/qutebrowser/browser/webengine/webenginetab.py
+++ b/qutebrowser/browser/webengine/webenginetab.py
@@ -28,7 +28,7 @@ import html as html_utils
import sip
from PyQt5.QtCore import (pyqtSignal, pyqtSlot, Qt, QEvent, QPoint, QPointF,
QUrl, QTimer)
-from PyQt5.QtGui import QKeyEvent
+from PyQt5.QtGui import QKeyEvent, QIcon
from PyQt5.QtNetwork import QAuthenticator
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWebEngineWidgets import QWebEnginePage, QWebEngineScript
@@ -923,6 +923,13 @@ class WebEngineTab(browsertab.AbstractTab):
self.openurl(url))
self._reload_url = None
+ if not qtutils.version_check('5.10', compiled=False):
+ # We can't do this when we have the loadFinished workaround as that
+ # sometimes clears icons without loading a new page.
+ # In general, this is handled by Qt, but when loading takes long,
+ # the old icon is still displayed.
+ self.icon_changed.emit(QIcon())
+
@pyqtSlot(QUrl)
def _on_predicted_navigation(self, url):
"""If we know we're going to visit an URL soon, change the settings."""