Add proxy support for QtWebEngine and Qt 5.7.1
This used to give us crashes in libproxy:
https://github.com/libproxy/libproxy/issues/45
https://bugreports.qt.io/browse/QTBUG-56852
However, trying again with Qt 5.7.1 on Debian and from PyPI, this doesn't happen
anymore, so it was probably something with how Archlinux handled things.
See #2082, #2775.
Reverts fd29528e4f
This commit is contained in:
parent
3b53ec1cb6
commit
629038632c
@ -45,6 +45,7 @@ Added
|
||||
customize statusbar colors for private windows.
|
||||
- New `{private}` field displaying `[Private Mode]` for
|
||||
`ui -> window-title-format` and `tabs -> title-format`.
|
||||
- (QtWebEngine) Proxy support with Qt 5.7.1 too
|
||||
|
||||
Changed
|
||||
~~~~~~~
|
||||
|
@ -789,8 +789,6 @@ The proxy to use.
|
||||
|
||||
In addition to the listed values, you can use a `socks://...` or `http://...` URL.
|
||||
|
||||
This setting only works with Qt 5.8 or newer when using the QtWebEngine backend.
|
||||
|
||||
Valid values:
|
||||
|
||||
* +system+: Use the system wide proxy.
|
||||
|
@ -410,10 +410,8 @@ def _init_modules(args, crash_handler):
|
||||
log.init.debug("Initializing network...")
|
||||
networkmanager.init()
|
||||
|
||||
if qtutils.version_check('5.8'):
|
||||
# Otherwise we can only initialize it for QtWebKit because of crashes
|
||||
log.init.debug("Initializing proxy...")
|
||||
proxy.init()
|
||||
log.init.debug("Initializing proxy...")
|
||||
proxy.init()
|
||||
|
||||
log.init.debug("Initializing readline-bridge...")
|
||||
readline_bridge = readline.ReadlineBridge()
|
||||
|
@ -33,7 +33,6 @@ from PyQt5.QtWebKit import QWebSettings
|
||||
from PyQt5.QtPrintSupport import QPrinter
|
||||
|
||||
from qutebrowser.browser import browsertab
|
||||
from qutebrowser.browser.network import proxy
|
||||
from qutebrowser.browser.webkit import webview, tabhistory, webkitelem
|
||||
from qutebrowser.browser.webkit.network import webkitqutescheme
|
||||
from qutebrowser.utils import qtutils, objreg, usertypes, utils, log, debug
|
||||
@ -42,12 +41,6 @@ from qutebrowser.utils import qtutils, objreg, usertypes, utils, log, debug
|
||||
def init():
|
||||
"""Initialize QtWebKit-specific modules."""
|
||||
qapp = QApplication.instance()
|
||||
|
||||
if not qtutils.version_check('5.8'):
|
||||
# Otherwise we initialize it globally in app.py
|
||||
log.init.debug("Initializing proxy...")
|
||||
proxy.init()
|
||||
|
||||
log.init.debug("Initializing js-bridge...")
|
||||
js_bridge = webkitqutescheme.JSBridge(qapp)
|
||||
objreg.register('js-bridge', js_bridge)
|
||||
|
@ -437,14 +437,10 @@ def data(readonly=False):
|
||||
"User agent to send. Empty to send the default."),
|
||||
|
||||
('proxy',
|
||||
SettingValue(typ.Proxy(), 'system',
|
||||
backends=(None if qtutils.version_check('5.8')
|
||||
else [usertypes.Backend.QtWebKit])),
|
||||
SettingValue(typ.Proxy(), 'system'),
|
||||
"The proxy to use.\n\n"
|
||||
"In addition to the listed values, you can use a `socks://...` "
|
||||
"or `http://...` URL.\n\n"
|
||||
"This setting only works with Qt 5.8 or newer when using the "
|
||||
"QtWebEngine backend."),
|
||||
"or `http://...` URL."),
|
||||
|
||||
('proxy-dns-requests',
|
||||
SettingValue(typ.Bool(), 'true',
|
||||
|
@ -365,8 +365,7 @@ def generate_commands(filename):
|
||||
|
||||
def _generate_setting_section(f, sectname, sect):
|
||||
"""Generate documentation for a single section."""
|
||||
version_dependent_options = [('network', 'proxy'),
|
||||
('general', 'print-element-backgrounds')]
|
||||
version_dependent_options = [('general', 'print-element-backgrounds')]
|
||||
for optname, option in sect.items():
|
||||
f.write("\n")
|
||||
f.write('[[{}-{}]]'.format(sectname, optname) + "\n")
|
||||
|
Loading…
Reference in New Issue
Block a user