Skip to content
Permalink
Browse files

Add a backend setting

See #2589
  • Loading branch information...
The-Compiler committed Sep 18, 2017
1 parent 61e183d commit b1b6c462c1a8a30abf37c4d785e5cc9925385b31
Showing with 51 additions and 5 deletions.
  1. +3 −0 doc/changelog.asciidoc
  2. +18 −0 doc/help/settings.asciidoc
  3. +8 −5 qutebrowser/config/config.py
  4. +22 −0 qutebrowser/config/configdata.yml
@@ -51,6 +51,9 @@ Added
- New back/forward indicator in the statusbar
- New `bindings.key_mappings` setting to map keys to other keys
- New `qt_args` setting to pass additional arguments to Qt/Chromium
- New `backend` setting to select the backend to use (auto/webengine/webkit).
Together with the previous setting, this should make wrapper scripts
unnecessary.
Changed
~~~~~~~
@@ -12,6 +12,7 @@
|<<aliases,aliases>>|Aliases for commands.
|<<auto_save.interval,auto_save.interval>>|How often (in milliseconds) to auto-save config/cookies/etc.
|<<auto_save.session,auto_save.session>>|Always restore open sites when qutebrowser is reopened.
|<<backend,backend>>|The backend to use to display websites.
|<<bindings.commands,bindings.commands>>|Keybindings mapping keys to commands in different modes.
|<<bindings.default,bindings.default>>|Default keybindings. If you want to add bindings, modify `bindings.commands` instead.
|<<bindings.key_mappings,bindings.key_mappings>>|This setting can be used to map keys to other keys.
@@ -285,6 +286,23 @@ Valid values:

Default: empty

[[backend]]
=== 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.

Type: <<types,String>>

Valid values:

* +auto+: Automatically select either QtWebEngine or QtWebKit
* +webkit+: Force QtWebKit
* +webengine+: Force QtWebEngine

Default: +pass:[auto]+

[[bindings.commands]]
=== bindings.commands
Keybindings mapping keys to commands in different modes.
@@ -700,12 +700,15 @@ def get_backend(args):
else:
webkit_available = qtutils.is_new_qtwebkit()

str_to_backend = {
'webkit': usertypes.Backend.QtWebKit,
'webengine': usertypes.Backend.QtWebEngine,
}

if args.backend is not None:
backends = {
'webkit': usertypes.Backend.QtWebKit,
'webengine': usertypes.Backend.QtWebEngine,
}
return backends[args.backend]
return str_to_backend[args.backend]
elif val.backend != 'auto':
return str_to_backend[val.backend]
elif webkit_available:
return usertypes.Backend.QtWebKit
else:
@@ -101,6 +101,28 @@ qt_args:
https://peter.sh/experiments/chromium-command-line-switches/ for a list)
will work.
backend:
type:
name: String
valid_values:
- auto: Automatically select either QtWebEngine or QtWebKit
- webkit: Force QtWebKit
- webengine: Force QtWebEngine
default: auto
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.
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.
## auto_save

auto_save.interval:

0 comments on commit b1b6c46

Please sign in to comment.
You can’t perform that action at this time.