Compare commits

...

6 Commits

Author SHA1 Message Date
Florian Bruhin
55a88ceea6 Release v1.0.2 2017-10-17 07:44:14 +02:00
Florian Bruhin
d4bf04d2c8 Bump up yaml timeout a bit
(cherry picked from commit 1a7612e559)
2017-10-17 06:29:00 +02:00
Florian Bruhin
cb527913dc Show better error message when trying to toggle with :set
(cherry picked from commit d8384ced0a)
2017-10-17 06:27:07 +02:00
Florian Bruhin
ddfa82345c Fix HTML escaping in completion
(cherry picked from commit e766fe14fc)
2017-10-16 12:27:45 +02:00
Florian Bruhin
45c75d5e04 Fix setting monospace fonts with None values
Fixes #3130

(cherry picked from commit 2a65cadb67)
2017-10-16 06:18:29 +02:00
Florian Bruhin
9404c61f10 Add SQLITE_READONLY to environmental errors
(cherry picked from commit fa4a66f7b3)
2017-10-15 21:10:31 +02:00
9 changed files with 49 additions and 15 deletions

View File

@@ -15,14 +15,23 @@ breaking changes (such as renamed commands) can happen in minor releases.
// `Fixed` for any bug fixes.
// `Security` to invite users to upgrade in case of vulnerabilities.
v1.0.2 (unreleased)
-------------------
v1.0.2
------
Fixes
~~~~~
- Fixed workaround for black screens with Nvidia cards
- Fix workaround for black screens or crashes with Nvidia cards
- Handle a filesystem going read-only gracefully
- Fix crash when setting `fonts.monospace`
- Fix list options not being modifyable via `.append()` in `config.py`
- Mark the content.notifications setting as QtWebKit only correctly
- Fix wrong rendering of keys like `<back>` in the completion
Changed
~~~~~~~
- Nicer error messages and other minor improvements
v1.0.1
------

View File

@@ -26,7 +26,7 @@ __copyright__ = "Copyright 2014-2017 Florian Bruhin (The Compiler)"
__license__ = "GPL"
__maintainer__ = __author__
__email__ = "mail@qutebrowser.org"
__version_info__ = (1, 0, 1)
__version_info__ = (1, 0, 2)
__version__ = '.'.join(str(e) for e in __version_info__)
__description__ = "A keyboard-driven, vim-like browser based on PyQt5."

View File

@@ -202,7 +202,8 @@ class CompletionItemDelegate(QStyledItemDelegate):
if index.column() in columns_to_filter and pattern:
repl = r'<span class="highlight">\g<0></span>'
text = re.sub(re.escape(pattern).replace(r'\ ', r'|'),
repl, self._opt.text, flags=re.IGNORECASE)
repl, html.escape(self._opt.text),
flags=re.IGNORECASE)
self._doc.setHtml(text)
else:
self._doc.setPlainText(self._opt.text)

View File

@@ -75,6 +75,10 @@ class ConfigCommands:
tabbed_browser.openurl(QUrl('qute://settings'), newtab=False)
return
if option.endswith('!'):
raise cmdexc.CommandError("Toggling values was moved to the "
":config-cycle command")
if option.endswith('?') and option != '?':
self._print_value(option[:-1])
return

View File

@@ -104,7 +104,9 @@ def _update_monospace_fonts():
continue
elif not isinstance(opt.typ, configtypes.Font):
continue
elif not config.instance.get_obj(name).endswith(' monospace'):
value = config.instance.get_obj(name)
if value is None or not value.endswith(' monospace'):
continue
config.instance.changed.emit(name)

View File

@@ -65,13 +65,12 @@ class SqliteError(SqlError):
log.sql.debug("error code: {}".format(error.nativeErrorCode()))
# https://sqlite.org/rescode.html
# https://github.com/qutebrowser/qutebrowser/issues/2930
# https://github.com/qutebrowser/qutebrowser/issues/3004
environmental_errors = [
# SQLITE_LOCKED,
# https://github.com/qutebrowser/qutebrowser/issues/2930
'9',
# SQLITE_FULL,
# https://github.com/qutebrowser/qutebrowser/issues/3004
'13',
'8', # SQLITE_READONLY
'9', # SQLITE_LOCKED,
'13', # SQLITE_FULL,
]
self.environmental = error.nativeErrorCode() in environmental_errors

View File

@@ -882,7 +882,7 @@ def yaml_load(f):
end = datetime.datetime.now()
delta = (end - start).total_seconds()
deadline = 3 if 'CI' in os.environ else 1
deadline = 3 if 'CI' in os.environ else 2
if delta > deadline: # pragma: no cover
log.misc.warning(
"YAML load took unusually long, please report this at "

View File

@@ -133,9 +133,9 @@ class TestSet:
"QtWebEngine backend!"):
commands.set(0, 'content.cookies.accept', 'all')
@pytest.mark.parametrize('option', ['?', '!', 'url.auto_search'])
@pytest.mark.parametrize('option', ['?', 'url.auto_search'])
def test_empty(self, commands, option):
"""Run ':set ?' / ':set !' / ':set url.auto_search'.
"""Run ':set ?' / ':set url.auto_search'.
Should show an error.
See https://github.com/qutebrowser/qutebrowser/issues/1109
@@ -145,6 +145,16 @@ class TestSet:
"value"):
commands.set(win_id=0, option=option)
def test_toggle(self, commands):
"""Try toggling a value.
Should show an nicer error.
"""
with pytest.raises(cmdexc.CommandError,
match="Toggling values was moved to the "
":config-cycle command"):
commands.set(win_id=0, option='javascript.enabled!')
def test_invalid(self, commands):
"""Run ':set foo?'.

View File

@@ -258,6 +258,15 @@ class TestEarlyInit:
# Font subclass, but doesn't end with "monospace"
assert 'fonts.web.family.standard' not in changed_options
def test_setting_monospace_fonts_family(self, init_patch, args):
"""Make sure setting fonts.monospace after a family works.
See https://github.com/qutebrowser/qutebrowser/issues/3130
"""
configinit.early_init(args)
config.instance.set_str('fonts.web.family.standard', '')
config.instance.set_str('fonts.monospace', 'Terminus')
def test_force_software_rendering(self, monkeypatch, config_stub):
"""Setting force_software_rendering should set the environment var."""
envvar = 'QT_XCB_FORCE_SOFTWARE_OPENGL'