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.
|
customize statusbar colors for private windows.
|
||||||
- New `{private}` field displaying `[Private Mode]` for
|
- New `{private}` field displaying `[Private Mode]` for
|
||||||
`ui -> window-title-format` and `tabs -> title-format`.
|
`ui -> window-title-format` and `tabs -> title-format`.
|
||||||
|
- (QtWebEngine) Proxy support with Qt 5.7.1 too
|
||||||
|
|
||||||
Changed
|
Changed
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
@ -789,8 +789,6 @@ The proxy to use.
|
|||||||
|
|
||||||
In addition to the listed values, you can use a `socks://...` or `http://...` URL.
|
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:
|
Valid values:
|
||||||
|
|
||||||
* +system+: Use the system wide proxy.
|
* +system+: Use the system wide proxy.
|
||||||
|
@ -410,10 +410,8 @@ def _init_modules(args, crash_handler):
|
|||||||
log.init.debug("Initializing network...")
|
log.init.debug("Initializing network...")
|
||||||
networkmanager.init()
|
networkmanager.init()
|
||||||
|
|
||||||
if qtutils.version_check('5.8'):
|
log.init.debug("Initializing proxy...")
|
||||||
# Otherwise we can only initialize it for QtWebKit because of crashes
|
proxy.init()
|
||||||
log.init.debug("Initializing proxy...")
|
|
||||||
proxy.init()
|
|
||||||
|
|
||||||
log.init.debug("Initializing readline-bridge...")
|
log.init.debug("Initializing readline-bridge...")
|
||||||
readline_bridge = readline.ReadlineBridge()
|
readline_bridge = readline.ReadlineBridge()
|
||||||
|
@ -33,7 +33,6 @@ from PyQt5.QtWebKit import QWebSettings
|
|||||||
from PyQt5.QtPrintSupport import QPrinter
|
from PyQt5.QtPrintSupport import QPrinter
|
||||||
|
|
||||||
from qutebrowser.browser import browsertab
|
from qutebrowser.browser import browsertab
|
||||||
from qutebrowser.browser.network import proxy
|
|
||||||
from qutebrowser.browser.webkit import webview, tabhistory, webkitelem
|
from qutebrowser.browser.webkit import webview, tabhistory, webkitelem
|
||||||
from qutebrowser.browser.webkit.network import webkitqutescheme
|
from qutebrowser.browser.webkit.network import webkitqutescheme
|
||||||
from qutebrowser.utils import qtutils, objreg, usertypes, utils, log, debug
|
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():
|
def init():
|
||||||
"""Initialize QtWebKit-specific modules."""
|
"""Initialize QtWebKit-specific modules."""
|
||||||
qapp = QApplication.instance()
|
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...")
|
log.init.debug("Initializing js-bridge...")
|
||||||
js_bridge = webkitqutescheme.JSBridge(qapp)
|
js_bridge = webkitqutescheme.JSBridge(qapp)
|
||||||
objreg.register('js-bridge', js_bridge)
|
objreg.register('js-bridge', js_bridge)
|
||||||
|
@ -437,14 +437,10 @@ def data(readonly=False):
|
|||||||
"User agent to send. Empty to send the default."),
|
"User agent to send. Empty to send the default."),
|
||||||
|
|
||||||
('proxy',
|
('proxy',
|
||||||
SettingValue(typ.Proxy(), 'system',
|
SettingValue(typ.Proxy(), 'system'),
|
||||||
backends=(None if qtutils.version_check('5.8')
|
|
||||||
else [usertypes.Backend.QtWebKit])),
|
|
||||||
"The proxy to use.\n\n"
|
"The proxy to use.\n\n"
|
||||||
"In addition to the listed values, you can use a `socks://...` "
|
"In addition to the listed values, you can use a `socks://...` "
|
||||||
"or `http://...` URL.\n\n"
|
"or `http://...` URL."),
|
||||||
"This setting only works with Qt 5.8 or newer when using the "
|
|
||||||
"QtWebEngine backend."),
|
|
||||||
|
|
||||||
('proxy-dns-requests',
|
('proxy-dns-requests',
|
||||||
SettingValue(typ.Bool(), 'true',
|
SettingValue(typ.Bool(), 'true',
|
||||||
|
@ -365,8 +365,7 @@ def generate_commands(filename):
|
|||||||
|
|
||||||
def _generate_setting_section(f, sectname, sect):
|
def _generate_setting_section(f, sectname, sect):
|
||||||
"""Generate documentation for a single section."""
|
"""Generate documentation for a single section."""
|
||||||
version_dependent_options = [('network', 'proxy'),
|
version_dependent_options = [('general', 'print-element-backgrounds')]
|
||||||
('general', 'print-element-backgrounds')]
|
|
||||||
for optname, option in sect.items():
|
for optname, option in sect.items():
|
||||||
f.write("\n")
|
f.write("\n")
|
||||||
f.write('[[{}-{}]]'.format(sectname, optname) + "\n")
|
f.write('[[{}-{}]]'.format(sectname, optname) + "\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user