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