Merge remote-tracking branch 'refs/remotes/origin/master'
This commit is contained in:
commit
2483b8315c
@ -1317,7 +1317,7 @@ tabs.title.format:
|
||||
* `{backend}`: Either ''webkit'' or ''webengine''
|
||||
* `{private}`: Indicates when private mode is enabled.
|
||||
* `{current_url}`: URL of the current web page.
|
||||
* `{protocol}` : Internet Protocol of the current web page.
|
||||
* `{protocol}`: Protocol (http/https/...) of the current web page
|
||||
|
||||
tabs.title.format_pinned:
|
||||
default: '{index}'
|
||||
|
@ -166,23 +166,25 @@ class TabWidget(QTabWidget):
|
||||
fields['backend'] = objects.backend.name
|
||||
fields['private'] = ' [Private Mode] ' if tab.private else ''
|
||||
|
||||
url = self.tab_url(idx)
|
||||
|
||||
if tab.load_status() == usertypes.LoadStatus.loading:
|
||||
fields['perc'] = '[{}%] '.format(tab.progress())
|
||||
else:
|
||||
fields['perc'] = ''
|
||||
|
||||
try:
|
||||
fields['host'] = self.tab_url(idx).host()
|
||||
fields['host'] = url.host()
|
||||
except qtutils.QtValueError:
|
||||
fields['host'] = ''
|
||||
|
||||
try:
|
||||
fields['current_url'] = self.tab_url(idx).url()
|
||||
fields['current_url'] = url.url()
|
||||
except qtutils.QtValueError:
|
||||
fields['current_url'] = ''
|
||||
|
||||
try:
|
||||
fields['protocol'] = self.tab_url(idx).scheme()
|
||||
fields['protocol'] = url.scheme()
|
||||
except qtutils.QtValueError:
|
||||
fields['protocol'] = ''
|
||||
|
||||
|
@ -131,11 +131,12 @@ class FakeUrl:
|
||||
|
||||
"""QUrl stub which provides .path(), isValid() and host()."""
|
||||
|
||||
def __init__(self, path=None, valid=True, host=None, url=None):
|
||||
def __init__(self, path=None, valid=True, host=None, url=None, scheme=None):
|
||||
self.path = mock.Mock(return_value=path)
|
||||
self.isValid = mock.Mock(returl_value=valid)
|
||||
self.host = mock.Mock(returl_value=host)
|
||||
self.url = mock.Mock(return_value=url)
|
||||
self.scheme = mock.Mock(return_value=scheme)
|
||||
|
||||
|
||||
class FakeNetworkReply:
|
||||
|
Loading…
Reference in New Issue
Block a user