Add -f option to reload

This commit is contained in:
HalosGhost 2014-12-19 08:27:22 -06:00 committed by Florian Bruhin
parent 5ca58843fc
commit 0a1fa87ac9
2 changed files with 7 additions and 2 deletions

View File

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

View File

@ -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']),