parent
29aedef420
commit
afcb018ee2
@ -370,7 +370,7 @@ The following logging levels are available for every logger:
|
|||||||
|
|
||||||
[width="75%",cols="25%,75%"]
|
[width="75%",cols="25%,75%"]
|
||||||
|=======================================================================
|
|=======================================================================
|
||||||
|criticial |Critical issue, qutebrowser can't continue to run.
|
|critical |Critical issue, qutebrowser can't continue to run.
|
||||||
|error |There was an issue and some kind of operation was abandoned.
|
|error |There was an issue and some kind of operation was abandoned.
|
||||||
|warning |There was an issue but the operation can continue running.
|
|warning |There was an issue but the operation can continue running.
|
||||||
|info |General informational messages.
|
|info |General informational messages.
|
||||||
|
@ -61,7 +61,7 @@ die() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
javascript_escape() {
|
javascript_escape() {
|
||||||
# print the first argument in a escaped way, such that it can savely
|
# print the first argument in a escaped way, such that it can safely
|
||||||
# be used within javascripts double quotes
|
# be used within javascripts double quotes
|
||||||
sed "s,[\\\'\"],\\\&,g" <<< "$1"
|
sed "s,[\\\'\"],\\\&,g" <<< "$1"
|
||||||
}
|
}
|
||||||
@ -80,7 +80,7 @@ javascript_escape() {
|
|||||||
# between different paths on the same domain.
|
# between different paths on the same domain.
|
||||||
|
|
||||||
simplify_url() {
|
simplify_url() {
|
||||||
simple_url="${1##*://}" # remove protocoll specification
|
simple_url="${1##*://}" # remove protocol specification
|
||||||
simple_url="${simple_url%%\?*}" # remove GET parameters
|
simple_url="${simple_url%%\?*}" # remove GET parameters
|
||||||
simple_url="${simple_url%%/*}" # remove directory path
|
simple_url="${simple_url%%/*}" # remove directory path
|
||||||
simple_url="${simple_url%:*}" # remove port
|
simple_url="${simple_url%:*}" # remove port
|
||||||
@ -106,7 +106,7 @@ simplify_url() {
|
|||||||
# fi
|
# fi
|
||||||
# }
|
# }
|
||||||
|
|
||||||
# Another beahviour is to drop another level of subdomains until search hits
|
# Another behaviour is to drop another level of subdomains until search hits
|
||||||
# are found:
|
# are found:
|
||||||
no_entries_found() {
|
no_entries_found() {
|
||||||
while [ 0 -eq "${#files[@]}" ] && [ -n "$simple_url" ]; do
|
while [ 0 -eq "${#files[@]}" ] && [ -n "$simple_url" ]; do
|
||||||
@ -170,7 +170,7 @@ choose_entry_random() {
|
|||||||
# dmenu or zenity or even qutebrowser completion in future?) which entry to
|
# dmenu or zenity or even qutebrowser completion in future?) which entry to
|
||||||
# pick
|
# pick
|
||||||
MENU_COMMAND=( head -n 1 )
|
MENU_COMMAND=( head -n 1 )
|
||||||
# whether to show the menu if there is only one entrie in it
|
# whether to show the menu if there is only one entry in it
|
||||||
menu_if_one_entry=0
|
menu_if_one_entry=0
|
||||||
choose_entry_menu() {
|
choose_entry_menu() {
|
||||||
local nr=${#files[@]}
|
local nr=${#files[@]}
|
||||||
@ -245,7 +245,7 @@ pass_backend() {
|
|||||||
done < <(find -L "$PREFIX" -iname '*.gpg' -print0)
|
done < <(find -L "$PREFIX" -iname '*.gpg' -print0)
|
||||||
fi
|
fi
|
||||||
if ((match_filename)) ; then
|
if ((match_filename)) ; then
|
||||||
# add entries wth matching filepath
|
# add entries with matching filepath
|
||||||
while read -r passfile ; do
|
while read -r passfile ; do
|
||||||
passfile="${passfile#$PREFIX}"
|
passfile="${passfile#$PREFIX}"
|
||||||
passfile="${passfile#/}"
|
passfile="${passfile#/}"
|
||||||
|
@ -534,7 +534,7 @@ class DownloadItem(QObject):
|
|||||||
self._filename = create_full_filename(
|
self._filename = create_full_filename(
|
||||||
self.basename, os.path.join(download_dir(), filename))
|
self.basename, os.path.join(download_dir(), filename))
|
||||||
|
|
||||||
# At this point, we have a misconfigured XDG_DOWNLOAd_DIR, as
|
# At this point, we have a misconfigured XDG_DOWNLOAD_DIR, as
|
||||||
# download_dir() + filename is still no absolute path.
|
# download_dir() + filename is still no absolute path.
|
||||||
# The config value is checked for "absoluteness", but
|
# The config value is checked for "absoluteness", but
|
||||||
# ~/.config/user-dirs.dirs may be misconfigured and a non-absolute path
|
# ~/.config/user-dirs.dirs may be misconfigured and a non-absolute path
|
||||||
|
@ -1056,7 +1056,7 @@ class WordHinter:
|
|||||||
self.dictionary = None
|
self.dictionary = None
|
||||||
|
|
||||||
def ensure_initialized(self):
|
def ensure_initialized(self):
|
||||||
"""Generate the used words if yet uninialized."""
|
"""Generate the used words if yet uninitialized."""
|
||||||
dictionary = config.get("hints", "dictionary")
|
dictionary = config.get("hints", "dictionary")
|
||||||
if not self.words or self.dictionary != dictionary:
|
if not self.words or self.dictionary != dictionary:
|
||||||
self.words.clear()
|
self.words.clear()
|
||||||
|
@ -401,7 +401,7 @@ class _Downloader:
|
|||||||
"""Callback when a download error occurred.
|
"""Callback when a download error occurred.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
url: The orignal url of the asset as QUrl.
|
url: The original url of the asset as QUrl.
|
||||||
item: The DownloadItem given by the DownloadManager.
|
item: The DownloadItem given by the DownloadManager.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
|
@ -217,7 +217,7 @@ class _POSIXUserscriptRunner(_BaseUserscriptRunner):
|
|||||||
self._cleanup()
|
self._cleanup()
|
||||||
|
|
||||||
def _cleanup(self):
|
def _cleanup(self):
|
||||||
"""Clean up reader and temorary files."""
|
"""Clean up reader and temporary files."""
|
||||||
if self._cleaned_up:
|
if self._cleaned_up:
|
||||||
return
|
return
|
||||||
log.procs.debug("Cleaning up")
|
log.procs.debug("Cleaning up")
|
||||||
|
@ -35,7 +35,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
span.warning {
|
span.warning {
|
||||||
text-weigth: bold;
|
text-weight: bold;
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ class StatusBar(QWidget):
|
|||||||
widget can adjust its size to it.
|
widget can adjust its size to it.
|
||||||
arg: The new size.
|
arg: The new size.
|
||||||
moved: Emitted when the statusbar has moved, so the completion widget
|
moved: Emitted when the statusbar has moved, so the completion widget
|
||||||
can move the the right position.
|
can move to the right position.
|
||||||
arg: The new position.
|
arg: The new position.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -439,7 +439,7 @@ class RAMHandler(logging.Handler):
|
|||||||
self._data.append(record)
|
self._data.append(record)
|
||||||
|
|
||||||
def dump_log(self, html=False, level='vdebug'):
|
def dump_log(self, html=False, level='vdebug'):
|
||||||
"""Dump the complete formatted log data as as string.
|
"""Dump the complete formatted log data as string.
|
||||||
|
|
||||||
FIXME: We should do all the HTML formatter via jinja2.
|
FIXME: We should do all the HTML formatter via jinja2.
|
||||||
(probably obsolete when moving to a widget for logging,
|
(probably obsolete when moving to a widget for logging,
|
||||||
|
@ -33,7 +33,7 @@ class HeaderChecker:
|
|||||||
|
|
||||||
"""Helper class with some convenience methods to check filenames.
|
"""Helper class with some convenience methods to check filenames.
|
||||||
|
|
||||||
Attrs:
|
Attributes:
|
||||||
caplog: fixture from pytest-capturelog
|
caplog: fixture from pytest-capturelog
|
||||||
stubs: fixture that provides testing stubs
|
stubs: fixture that provides testing stubs
|
||||||
"""
|
"""
|
||||||
|
@ -161,7 +161,7 @@ def create_blocklist(directory, blocked_hosts=BLOCKLIST_HOSTS,
|
|||||||
for host in blocked_hosts:
|
for host in blocked_hosts:
|
||||||
blocklist.write(host + ' This is not a correct hosts file\n')
|
blocklist.write(host + ' This is not a correct hosts file\n')
|
||||||
else:
|
else:
|
||||||
raise ValueError('Uncorrect line_format argument')
|
raise ValueError('Incorrect line_format argument')
|
||||||
return str(blocklist_file)
|
return str(blocklist_file)
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ def test_cache_size_leq_max_cache_size(config_stub, tmpdir):
|
|||||||
preload_cache(disk_cache, 'http://foo.xxx')
|
preload_cache(disk_cache, 'http://foo.xxx')
|
||||||
preload_cache(disk_cache, 'http://bar.net')
|
preload_cache(disk_cache, 'http://bar.net')
|
||||||
assert disk_cache.expire() < limit
|
assert disk_cache.expire() < limit
|
||||||
# Add a threshold to the limit due to unforseeable Qt internals
|
# Add a threshold to the limit due to unforeseeable Qt internals
|
||||||
assert disk_cache.cacheSize() < limit + 100
|
assert disk_cache.cacheSize() < limit + 100
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ class Checker:
|
|||||||
|
|
||||||
"""A helper to check mhtml output.
|
"""A helper to check mhtml output.
|
||||||
|
|
||||||
Attrs:
|
Attributes:
|
||||||
fp: A BytesIO object for passing to MHTMLWriter.write_to.
|
fp: A BytesIO object for passing to MHTMLWriter.write_to.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ def test_exit_unsuccessful_output(qtbot, proc, caplog, py_proc, stream):
|
|||||||
|
|
||||||
@pytest.mark.parametrize('stream', ['stdout', 'stderr'])
|
@pytest.mark.parametrize('stream', ['stdout', 'stderr'])
|
||||||
def test_exit_successful_output(qtbot, proc, py_proc, stream):
|
def test_exit_successful_output(qtbot, proc, py_proc, stream):
|
||||||
"""When a process suceeds, no output should be logged.
|
"""When a process succeeds, no output should be logged.
|
||||||
|
|
||||||
The test doesn't actually check the log as it'd fail because of the error
|
The test doesn't actually check the log as it'd fail because of the error
|
||||||
logging.
|
logging.
|
||||||
|
@ -81,7 +81,7 @@ def test_suggestions(keyhint, key_config_stub):
|
|||||||
|
|
||||||
|
|
||||||
def test_special_bindings(keyhint, key_config_stub):
|
def test_special_bindings(keyhint, key_config_stub):
|
||||||
"""Ensure the a prefix of '<' doesn't suggest special keys."""
|
"""Ensure a prefix of '<' doesn't suggest special keys."""
|
||||||
# we want the dict to return sorted items() for reliable testing
|
# we want the dict to return sorted items() for reliable testing
|
||||||
key_config_stub.set_bindings_for('normal', OrderedDict([
|
key_config_stub.set_bindings_for('normal', OrderedDict([
|
||||||
('<a', 'cmd-<a'),
|
('<a', 'cmd-<a'),
|
||||||
@ -95,7 +95,7 @@ def test_special_bindings(keyhint, key_config_stub):
|
|||||||
|
|
||||||
|
|
||||||
def test_color_switch(keyhint, config_stub, key_config_stub):
|
def test_color_switch(keyhint, config_stub, key_config_stub):
|
||||||
"""Ensure the the keyhint suffix color can be updated at runtime."""
|
"""Ensure the keyhint suffix color can be updated at runtime."""
|
||||||
config_stub.set('colors', 'keyhint.fg.suffix', '#ABCDEF')
|
config_stub.set('colors', 'keyhint.fg.suffix', '#ABCDEF')
|
||||||
key_config_stub.set_bindings_for('normal', OrderedDict([
|
key_config_stub.set_bindings_for('normal', OrderedDict([
|
||||||
('aa', 'cmd-aa')]))
|
('aa', 'cmd-aa')]))
|
||||||
@ -114,7 +114,7 @@ def test_no_matches(keyhint, key_config_stub):
|
|||||||
|
|
||||||
|
|
||||||
def test_blacklist(keyhint, config_stub, key_config_stub):
|
def test_blacklist(keyhint, config_stub, key_config_stub):
|
||||||
"""Test that blacklisted keychaints aren't hinted."""
|
"""Test that blacklisted keychains aren't hinted."""
|
||||||
config_stub.set('ui', 'keyhint-blacklist', ['ab*'])
|
config_stub.set('ui', 'keyhint-blacklist', ['ab*'])
|
||||||
# we want the dict to return sorted items() for reliable testing
|
# we want the dict to return sorted items() for reliable testing
|
||||||
key_config_stub.set_bindings_for('normal', OrderedDict([
|
key_config_stub.set_bindings_for('normal', OrderedDict([
|
||||||
|
Loading…
Reference in New Issue
Block a user