Merge branch 'halosghost-force-reload'
This commit is contained in:
commit
8b9f323f41
@ -137,6 +137,7 @@ Contributors, sorted by the number of commits in descending order:
|
||||
* Regina Hug
|
||||
* Peter Vilim
|
||||
* Helen Sherwood-Taylor
|
||||
* HalosGhost
|
||||
// QUTE_AUTHORS_END
|
||||
|
||||
The following people have contributed graphics:
|
||||
|
@ -322,8 +322,13 @@ Quit qutebrowser.
|
||||
|
||||
[[reload]]
|
||||
=== reload
|
||||
Syntax: +:reload [*--force*]+
|
||||
|
||||
Reload the current/[count]th tab.
|
||||
|
||||
==== optional arguments
|
||||
* +*-f*+, +*--force*+: Bypass the page cache.
|
||||
|
||||
==== count
|
||||
The tab index to reload.
|
||||
|
||||
|
@ -29,7 +29,7 @@ from PyQt5.QtWidgets import QApplication, QTabBar
|
||||
from PyQt5.QtCore import Qt, QUrl
|
||||
from PyQt5.QtGui import QClipboard
|
||||
from PyQt5.QtPrintSupport import QPrintDialog, QPrintPreviewDialog
|
||||
from PyQt5.QtWebKitWidgets import QWebInspector
|
||||
from PyQt5.QtWebKitWidgets import QWebPage, QWebInspector
|
||||
import pygments
|
||||
import pygments.lexers
|
||||
import pygments.formatters
|
||||
@ -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.page().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