diff --git a/qutebrowser/browser/webengine/webenginesettings.py b/qutebrowser/browser/webengine/webenginesettings.py index 10c4d4e6b..379051f6b 100644 --- a/qutebrowser/browser/webengine/webenginesettings.py +++ b/qutebrowser/browser/webengine/webenginesettings.py @@ -25,6 +25,7 @@ Module attributes: """ import os +import operator from PyQt5.QtGui import QFont from PyQt5.QtWebEngineWidgets import (QWebEngineSettings, QWebEngineProfile, @@ -165,7 +166,11 @@ class WebEngineSettings(websettings.AbstractSettings): ('PrintElementBackgrounds', None), # Qt 5.11 'content.autoplay': - ('PlaybackRequiresUserGesture', lambda val: not val), + ('PlaybackRequiresUserGesture', operator.not_), + + # Qt 5.12 + 'content.dns_prefetch': + ('DnsPrefetchEnabled', None), } for name, (attribute, converter) in new_attributes.items(): try: diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 52100ae8a..e3f2ce397 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -164,6 +164,7 @@ def _parse_yaml_backends_dict( 'Qt 5.9.2': qtutils.version_check('5.9.2'), 'Qt 5.10': qtutils.version_check('5.10'), 'Qt 5.11': qtutils.version_check('5.11'), + 'Qt 5.12': qtutils.version_check('5.12'), } for key in sorted(node.keys()): if conditionals[node[key]]: diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index b6d4736ae..514d30263 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -379,7 +379,9 @@ content.developer_extras: content.dns_prefetch: default: true type: Bool - backend: QtWebKit + backend: + QtWebKit: true + QtWebEngine: Qt 5.12 supports_pattern: true desc: Try to pre-fetch DNS entries to speed up browsing.