diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 3c6c796c7..417e3e450 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -36,6 +36,21 @@ Changed - There's now completion for commands taking a variable count of arguments (like `:config-cycle`). + +v1.3.1 (unreleased) +------------------- + +Added +~~~~~ + +- Work around a bug in Qt 5.11 where only the top/bottom half of the window is used. + +Fixed +~~~~~ + +- Work around an issue in Qt 5.11 where e.g. activating JavaScript per-domain + needed a manual relaod in some cases. + v1.3.0 ------ diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index a29b2293c..cbe996ce4 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -3,7 +3,7 @@ attrs==18.1.0 flake8==3.5.0 flake8-bugbear==18.2.0 -flake8-builtins==1.3.1 # rq.filter: != 1.4.0 +flake8-builtins==1.4.1 # rq.filter: != 1.4.0 flake8-comprehensions==1.4.1 flake8-copyright==0.2.0 flake8-debugger==3.1.0 diff --git a/misc/requirements/requirements-pip.txt b/misc/requirements/requirements-pip.txt index 60f24f057..34dc41d4d 100644 --- a/misc/requirements/requirements-pip.txt +++ b/misc/requirements/requirements-pip.txt @@ -5,4 +5,4 @@ packaging==17.1 pyparsing==2.2.0 setuptools==39.1.0 six==1.11.0 -wheel==0.31.0 +wheel==0.31.1 diff --git a/misc/requirements/requirements-pylint-master.txt b/misc/requirements/requirements-pylint-master.txt index 391526ad0..878f1390f 100644 --- a/misc/requirements/requirements-pylint-master.txt +++ b/misc/requirements/requirements-pylint-master.txt @@ -9,7 +9,7 @@ isort==4.3.4 lazy-object-proxy==1.3.1 mccabe==0.6.1 -e git+https://github.com/PyCQA/pylint.git#egg=pylint -python-dateutil==2.7.2 +python-dateutil==2.7.3 ./scripts/dev/pylint_checkers requests==2.18.4 six==1.11.0 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 997a6edb6..28add7741 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -9,7 +9,7 @@ isort==4.3.4 lazy-object-proxy==1.3.1 mccabe==0.6.1 pylint==1.8.4 -python-dateutil==2.7.2 +python-dateutil==2.7.3 ./scripts/dev/pylint_checkers requests==2.18.4 six==1.11.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 2d3fb1020..cddf48309 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -11,7 +11,7 @@ fields==5.0.0 Flask==1.0.2 glob2==0.6 hunter==2.0.2 -hypothesis==3.56.5 +hypothesis==3.56.9 itsdangerous==0.24 # Jinja2==2.10 Mako==1.0.7 diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index a9a7c269d..2ee0fc074 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -1062,6 +1062,21 @@ class WebEngineTab(browsertab.AbstractTab): def _on_navigation_request(self, navigation): super()._on_navigation_request(navigation) + if qtutils.version_check('5.11.0', exact=True, compiled=False): + # WORKAROUND for https://bugreports.qt.io/browse/QTBUG-68224 + layout = self._widget.layout() + count = layout.count() + if count > 1: + for i in range(count): + item = layout.itemAt(i) + if item is None: + continue + widget = item.widget() + if widget is not self._widget.focusProxy(): + log.webview.debug("Removing widget {} (QTBUG-68224)" + .format(widget)) + layout.removeWidget(widget) + if navigation.url == QUrl('qute://print'): command_dispatcher = objreg.get('command-dispatcher', scope='window', @@ -1072,20 +1087,27 @@ class WebEngineTab(browsertab.AbstractTab): if not navigation.accepted or not navigation.is_main_frame: return - needs_reload = { + settings_needing_reload = { 'content.plugins', 'content.javascript.enabled', 'content.javascript.can_access_clipboard', - 'content.javascript.can_access_clipboard', 'content.print_element_backgrounds', 'input.spatial_navigation', - 'input.spatial_navigation', } - assert needs_reload.issubset(configdata.DATA) + assert settings_needing_reload.issubset(configdata.DATA) changed = self.settings.update_for_url(navigation.url) - if (changed & needs_reload and navigation.navigation_type != - navigation.Type.link_clicked): + reload_needed = changed & settings_needing_reload + + # On Qt < 5.11, we don't don't need a reload when type == link_clicked. + # On Qt 5.11.0, we always need a reload. + # TODO on Qt > 5.11.0, we hopefully never need a reload: + # https://codereview.qt-project.org/#/c/229525/1 + if not qtutils.version_check('5.11.0', exact=True, compiled=False): + if navigation.navigation_type != navigation.Type.link_clicked: + reload_needed = False + + if reload_needed: # WORKAROUND for https://bugreports.qt.io/browse/QTBUG-66656 self._reload_url = navigation.url diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index 86973a3de..47e054bec 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -399,6 +399,7 @@ def version(): lines += [ 'Frozen: {}'.format(hasattr(sys, 'frozen')), "Imported from {}".format(importpath), + "Using Python from {}".format(sys.executable), "Qt library executable path: {}, data path: {}".format( QLibraryInfo.location(QLibraryInfo.LibraryExecutablesPath), QLibraryInfo.location(QLibraryInfo.DataPath) diff --git a/tests/unit/utils/test_version.py b/tests/unit/utils/test_version.py index fe45fec97..683fba02e 100644 --- a/tests/unit/utils/test_version.py +++ b/tests/unit/utils/test_version.py @@ -874,6 +874,7 @@ def test_version_output(params, stubs, monkeypatch): '_git_str': lambda: ('GIT COMMIT' if params.git_commit else None), 'platform.python_implementation': lambda: 'PYTHON IMPLEMENTATION', 'platform.python_version': lambda: 'PYTHON VERSION', + 'sys.executable': 'EXECUTABLE PATH', 'PYQT_VERSION_STR': 'PYQT VERSION', 'earlyinit.qt_version': lambda: 'QT VERSION', '_module_versions': lambda: ['MODULE VERSION 1', 'MODULE VERSION 2'], @@ -897,6 +898,7 @@ def test_version_output(params, stubs, monkeypatch): 'qt': 'QT VERSION', 'frozen': str(params.frozen), 'import_path': import_path, + 'python_path': 'EXECUTABLE PATH', } if params.with_webkit: @@ -951,6 +953,7 @@ def test_version_output(params, stubs, monkeypatch): Platform: PLATFORM, ARCHITECTURE{linuxdist} Frozen: {frozen} Imported from {import_path} + Using Python from {python_path} Qt library executable path: QT PATH, data path: QT PATH {osinfo} Paths: