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
This commit is contained in:
Florian Bruhin 2018-03-05 18:29:01 +01:00
parent 43cab4d978
commit 9320214429
3 changed files with 4 additions and 2 deletions

View File

@ -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.

View File

@ -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):

View File

@ -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)