Add -f option to reload
This commit is contained in:
parent
5ca58843fc
commit
0a1fa87ac9
@ -305,15 +305,19 @@ class CommandDispatcher:
|
||||
|
||||
@cmdutils.register(instance='command-dispatcher', name='reload',
|
||||
scope='window')
|
||||
def reloadpage(self, count: {'special': 'count'}=None):
|
||||
def reloadpage(self, force=False, count: {'special': 'count'}=None):
|
||||
"""Reload the current/[count]th tab.
|
||||
|
||||
Args:
|
||||
count: The tab index to reload, or None.
|
||||
force: Bypass the page cache.
|
||||
"""
|
||||
tab = self._cntwidget(count)
|
||||
if tab is not None:
|
||||
tab.reload()
|
||||
if force:
|
||||
tab.triggerAction(QWebPage.ReloadAndBypassCache)
|
||||
else:
|
||||
tab.reload()
|
||||
|
||||
@cmdutils.register(instance='command-dispatcher', scope='window')
|
||||
def stop(self, count: {'special': 'count'}=None):
|
||||
|
@ -945,6 +945,7 @@ KEY_DATA = collections.OrderedDict([
|
||||
('tab-prev', ['K']),
|
||||
('tab-clone', ['gC']),
|
||||
('reload', ['r']),
|
||||
('reload -f', ['R']),
|
||||
('back', ['H', '<Backspace>']),
|
||||
('back -t', ['th']),
|
||||
('back -w', ['wh']),
|
||||
|
Loading…
Reference in New Issue
Block a user