From ca4a9975591c0f39d3f977bee5812563fbbe5885 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 27 Sep 2017 10:33:16 +0200 Subject: [PATCH] Update settings for QtWebEngine by default See #2335 --- doc/help/settings.asciidoc | 11 +++++------ qutebrowser/config/configdata.yml | 19 +++++++++---------- qutebrowser/config/configinit.py | 13 +------------ 3 files changed, 15 insertions(+), 28 deletions(-) diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index e08869903..36159b2db 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -291,18 +291,17 @@ Default: +pass:[false]+ === backend The backend to use to display websites. qutebrowser supports two different web rendering engines / backends, QtWebKit and QtWebEngine. -QtWebKit is based on WebKit (similar to Safari). It was discontinued by the Qt project with Qt 5.6, but picked up as a well maintained fork: https://github.com/annulen/webkit/wiki - qutebrowser only supports the fork. -QtWebEngine is Qt's official successor to QtWebKit and based on the Chromium project. It's slightly more resource hungry that QtWebKit and has a couple of missing features in qutebrowser, but is generally the preferred choice. +QtWebKit was discontinued by the Qt project with Qt 5.6, but picked up as a well maintained fork: https://github.com/annulen/webkit/wiki - qutebrowser only supports the fork. +QtWebEngine is Qt's official successor to QtWebKit. It's slightly more resource hungry that QtWebKit and has a couple of missing features in qutebrowser, but is generally the preferred choice. Type: <> Valid values: - * +auto+: Automatically select either QtWebEngine or QtWebKit - * +webkit+: Force QtWebKit - * +webengine+: Force QtWebEngine + * +webengine+: Use QtWebEngine (based on Chromium) + * +webkit+: Use QtWebKit (based on WebKit, similar to Safari) -Default: +pass:[auto]+ +Default: +pass:[webengine]+ [[bindings.commands]] === bindings.commands diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 2055e518d..c597fb188 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -105,23 +105,22 @@ backend: type: name: String valid_values: - - auto: Automatically select either QtWebEngine or QtWebKit - - webkit: Force QtWebKit - - webengine: Force QtWebEngine - default: auto + - webengine: Use QtWebEngine (based on Chromium) + - webkit: Use QtWebKit (based on WebKit, similar to Safari) + default: webengine desc: >- The backend to use to display websites. qutebrowser supports two different web rendering engines / backends, QtWebKit and QtWebEngine. - QtWebKit is based on WebKit (similar to Safari). It was discontinued by the - Qt project with Qt 5.6, but picked up as a well maintained fork: - https://github.com/annulen/webkit/wiki - qutebrowser only supports the fork. + QtWebKit was discontinued by the Qt project with Qt 5.6, but picked up as a + well maintained fork: https://github.com/annulen/webkit/wiki - qutebrowser + only supports the fork. - QtWebEngine is Qt's official successor to QtWebKit and based on the Chromium - project. It's slightly more resource hungry that QtWebKit and has a couple - of missing features in qutebrowser, but is generally the preferred choice. + QtWebEngine is Qt's official successor to QtWebKit. It's slightly more + resource hungry that QtWebKit and has a couple of missing features in + qutebrowser, but is generally the preferred choice. ## auto_save diff --git a/qutebrowser/config/configinit.py b/qutebrowser/config/configinit.py index 3ec98a293..aa622850c 100644 --- a/qutebrowser/config/configinit.py +++ b/qutebrowser/config/configinit.py @@ -74,13 +74,6 @@ def early_init(args): def get_backend(args): """Find out what backend to use based on available libraries.""" - try: - import PyQt5.QtWebKit # pylint: disable=unused-variable - except ImportError: - webkit_available = False - else: - webkit_available = qtutils.is_new_qtwebkit() - str_to_backend = { 'webkit': usertypes.Backend.QtWebKit, 'webengine': usertypes.Backend.QtWebEngine, @@ -88,12 +81,8 @@ def get_backend(args): if args.backend is not None: return str_to_backend[args.backend] - elif config.val.backend != 'auto': - return str_to_backend[config.val.backend] - elif webkit_available: - return usertypes.Backend.QtWebKit else: - return usertypes.Backend.QtWebEngine + return str_to_backend[config.val.backend] def late_init(save_manager):