summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2018-03-05 18:29:01 +0100
committerFlorian Bruhin <git@the-compiler.org>2018-03-05 18:29:01 +0100
commit9320214429e6dc269d7d87042e474873ab8ad4f4 (patch)
treece2d6cb9087fa96db44ce7e0809681c349086886
parent43cab4d9787682f7665ae00c0105355a5a6ed7a9 (diff)
downloadqutebrowser-9320214429e6dc269d7d87042e474873ab8ad4f4.tar.gz
qutebrowser-9320214429e6dc269d7d87042e474873ab8ad4f4.zip
Only clear favicons on load with QtWebKit
QtWebEngine seems to automatically clear the favicon when loading e.g. about:blank, and not clearing it there again fixes #3469. Original issue: #187
-rw-r--r--doc/changelog.asciidoc1
-rw-r--r--qutebrowser/browser/webkit/webkittab.py4
-rw-r--r--qutebrowser/mainwindow/tabbedbrowser.py1
3 files changed, 4 insertions, 2 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index d30eb3ca8..c3efe08a8 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -102,6 +102,7 @@ Fixed
- QtWebEngine: Keys like `Ctrl-V` or `Shift-Insert` are now correctly
handled/filtered with Qt 5.10.
- QtWebEngine: Fixed hangs/segfaults on exit with Qt 5.10.1.
+- QtWebEngine: Fixed favicons sometimes getting cleared with Qt 5.10.
- QtWebKit: `:view-source` now displays a valid URL.
- URLs containing ampersands and other special chars are now shown
correctly when filtering them in the completion.
diff --git a/qutebrowser/browser/webkit/webkittab.py b/qutebrowser/browser/webkit/webkittab.py
index ef38892cc..ac2610f5f 100644
--- a/qutebrowser/browser/webkit/webkittab.py
+++ b/qutebrowser/browser/webkit/webkittab.py
@@ -30,7 +30,7 @@ import pygments.formatters
import sip
from PyQt5.QtCore import (pyqtSlot, Qt, QEvent, QUrl, QPoint, QTimer, QSizeF,
QSize)
-from PyQt5.QtGui import QKeyEvent
+from PyQt5.QtGui import QKeyEvent, QIcon
from PyQt5.QtWebKitWidgets import QWebPage, QWebFrame
from PyQt5.QtWebKit import QWebSettings
from PyQt5.QtPrintSupport import QPrinter
@@ -743,6 +743,8 @@ class WebKitTab(browsertab.AbstractTab):
def _on_load_started(self):
super()._on_load_started()
self.networkaccessmanager().netrc_used = False
+ # Make sure the icon is cleared when navigating to a page without one.
+ self.icon_changed.emit(QIcon())
@pyqtSlot()
def _on_frame_load_finished(self):
diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py
index 299a5fb08..f59018c43 100644
--- a/qutebrowser/mainwindow/tabbedbrowser.py
+++ b/qutebrowser/mainwindow/tabbedbrowser.py
@@ -552,7 +552,6 @@ class TabbedBrowser(tabwidget.TabWidget):
if tab.data.keep_icon:
tab.data.keep_icon = False
else:
- self.setTabIcon(idx, QIcon())
if (config.val.tabs.tabs_are_windows and
config.val.tabs.favicons.show):
self.window().setWindowIcon(self.default_window_icon)