parent
dcd6bcd2f4
commit
1c9598d2c0
@ -706,7 +706,9 @@ class WebEngineTab(browsertab.AbstractTab):
|
||||
self._widget.shutdown()
|
||||
|
||||
def reload(self, *, force=False):
|
||||
self.predicted_navigation.emit(self.url())
|
||||
if self.url().isValid():
|
||||
self.predicted_navigation.emit(self.url())
|
||||
|
||||
if force:
|
||||
action = QWebEnginePage.ReloadAndBypassCache
|
||||
else:
|
||||
@ -931,6 +933,7 @@ class WebEngineTab(browsertab.AbstractTab):
|
||||
@pyqtSlot(QUrl)
|
||||
def _on_predicted_navigation(self, url):
|
||||
"""If we know we're going to visit an URL soon, change the settings."""
|
||||
qtutils.ensure_valid(url)
|
||||
self.settings.update_for_url(url)
|
||||
|
||||
@pyqtSlot(usertypes.NavigationRequest)
|
||||
|
@ -701,7 +701,9 @@ class WebKitTab(browsertab.AbstractTab):
|
||||
self._widget.shutdown()
|
||||
|
||||
def reload(self, *, force=False):
|
||||
self.predicted_navigation.emit(self.url())
|
||||
if self.url().isValid():
|
||||
self.predicted_navigation.emit(self.url())
|
||||
|
||||
if force:
|
||||
action = QWebPage.ReloadAndBypassCache
|
||||
else:
|
||||
|
@ -22,7 +22,7 @@
|
||||
from PyQt5.QtGui import QFont
|
||||
|
||||
from qutebrowser.config import config, configutils
|
||||
from qutebrowser.utils import log, usertypes, urlmatch
|
||||
from qutebrowser.utils import log, usertypes, urlmatch, qtutils
|
||||
from qutebrowser.misc import objects
|
||||
|
||||
UNSET = object()
|
||||
@ -141,6 +141,7 @@ class AbstractSettings:
|
||||
Return:
|
||||
A set of settings which actually changed.
|
||||
"""
|
||||
qtutils.ensure_valid(url)
|
||||
changed_settings = set()
|
||||
for values in config.instance:
|
||||
if not values.opt.supports_pattern:
|
||||
|
Loading…
Reference in New Issue
Block a user