summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.asciidoc2
-rw-r--r--doc/help/settings.asciidoc2
-rw-r--r--doc/qutebrowser.1.asciidoc2
-rw-r--r--qutebrowser/app.py6
-rw-r--r--qutebrowser/browser/webengine/webenginesettings.py3
-rw-r--r--qutebrowser/browser/webengine/webenginetab.py3
-rw-r--r--qutebrowser/browser/webkit/webkittab.py7
-rw-r--r--qutebrowser/config/configdata.py8
-rw-r--r--qutebrowser/misc/earlyinit.py1
-rw-r--r--qutebrowser/qutebrowser.py3
-rwxr-xr-xscripts/dev/src2asciidoc.py3
-rw-r--r--tests/end2end/features/downloads.feature4
-rw-r--r--tests/end2end/features/scroll.feature7
-rw-r--r--tests/end2end/features/test_downloads_bdd.py9
-rw-r--r--tests/unit/misc/test_editor.py10
-rw-r--r--tox.ini2
16 files changed, 39 insertions, 33 deletions
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 353bd3d00..ea7481030 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -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
~~~~~~~
@@ -137,6 +138,7 @@ Fixed
fixed.
- Scrolling to an anchor in a background tab now works correctly, and javascript
gets the correct window size for background tabs.
+- (QtWebEngine) `:scroll-page` with `--bottom-navigate` now works correctly
v0.10.1
-------
diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc
index 9c362dbca..b038d462d 100644
--- a/doc/help/settings.asciidoc
+++ b/doc/help/settings.asciidoc
@@ -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.
diff --git a/doc/qutebrowser.1.asciidoc b/doc/qutebrowser.1.asciidoc
index cd95bf8e5..1b8345b0c 100644
--- a/doc/qutebrowser.1.asciidoc
+++ b/doc/qutebrowser.1.asciidoc
@@ -57,7 +57,7 @@ show it.
How URLs should be opened if there is already a qutebrowser instance running.
*--backend* '{webkit,webengine}'::
- Which backend to use (webengine backend is EXPERIMENTAL!).
+ Which backend to use.
*--enable-webengine-inspector*::
Enable the web inspector for QtWebEngine. Note that this is a SECURITY RISK and you should not visit untrusted websites with the inspector turned on. See https://bugreports.qt.io/browse/QTBUG-50725 for more details.
diff --git a/qutebrowser/app.py b/qutebrowser/app.py
index a3a855f9a..65e8d8181 100644
--- a/qutebrowser/app.py
+++ b/qutebrowser/app.py
@@ -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()
diff --git a/qutebrowser/browser/webengine/webenginesettings.py b/qutebrowser/browser/webengine/webenginesettings.py
index 66f3a1219..493a2a687 100644
--- a/qutebrowser/browser/webengine/webenginesettings.py
+++ b/qutebrowser/browser/webengine/webenginesettings.py
@@ -132,9 +132,6 @@ def _init_stylesheet(profile):
Mostly inspired by QupZilla:
https://github.com/QupZilla/qupzilla/blob/v2.0/src/lib/app/mainapplication.cpp#L1063-L1101
https://github.com/QupZilla/qupzilla/blob/v2.0/src/lib/tools/scripts.cpp#L119-L132
-
- FIXME:qtwebengine Use QWebEngineStyleSheet once that's available
- https://codereview.qt-project.org/#/c/148671/
"""
old_script = profile.scripts().findScript('_qute_stylesheet')
if not old_script.isNull():
diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py
index 8acd0eda0..0a4c2dfc7 100644
--- a/qutebrowser/browser/webengine/webenginetab.py
+++ b/qutebrowser/browser/webengine/webenginetab.py
@@ -20,6 +20,7 @@
"""Wrapper over a QWebEngineView."""
import os
+import math
import functools
import sip
@@ -342,7 +343,7 @@ class WebEngineScroller(browsertab.AbstractScroller):
else:
perc_y = min(100, round(100 / dy * jsret['px']['y']))
- self._at_bottom = dy >= jsret['px']['y']
+ self._at_bottom = math.ceil(jsret['px']['y']) >= dy
self._pos_perc = perc_x, perc_y
self.perc_changed.emit(*self._pos_perc)
diff --git a/qutebrowser/browser/webkit/webkittab.py b/qutebrowser/browser/webkit/webkittab.py
index fa626e863..c29aa15cb 100644
--- a/qutebrowser/browser/webkit/webkittab.py
+++ b/qutebrowser/browser/webkit/webkittab.py
@@ -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)
diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py
index 28cf41ac5..32d80f3b7 100644
--- a/qutebrowser/config/configdata.py
+++ b/qutebrowser/config/configdata.py
@@ -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',
diff --git a/qutebrowser/misc/earlyinit.py b/qutebrowser/misc/earlyinit.py
index e0cbfbbc9..4993d6927 100644
--- a/qutebrowser/misc/earlyinit.py
+++ b/qutebrowser/misc/earlyinit.py
@@ -336,6 +336,7 @@ def check_libraries(backend):
"http://pyyaml.org/download/pyyaml/ (py3.4) "
"or Install via pip.",
pip="PyYAML"),
+ 'PyQt5.QtQml': _missing_str("PyQt5.QtQml"),
}
if backend == 'webengine':
modules['PyQt5.QtWebEngineWidgets'] = _missing_str("QtWebEngine",
diff --git a/qutebrowser/qutebrowser.py b/qutebrowser/qutebrowser.py
index eba5b6884..e163a9f8d 100644
--- a/qutebrowser/qutebrowser.py
+++ b/qutebrowser/qutebrowser.py
@@ -64,8 +64,7 @@ def get_argparser():
help="How URLs should be opened if there is already a "
"qutebrowser instance running.")
parser.add_argument('--backend', choices=['webkit', 'webengine'],
- help="Which backend to use (webengine backend is "
- "EXPERIMENTAL!).")
+ help="Which backend to use.")
parser.add_argument('--enable-webengine-inspector', action='store_true',
help="Enable the web inspector for QtWebEngine. Note "
"that this is a SECURITY RISK and you should not "
diff --git a/scripts/dev/src2asciidoc.py b/scripts/dev/src2asciidoc.py
index 7445a99c6..a202edeb3 100755
--- a/scripts/dev/src2asciidoc.py
+++ b/scripts/dev/src2asciidoc.py
@@ -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")
diff --git a/tests/end2end/features/downloads.feature b/tests/end2end/features/downloads.feature
index 95b775303..07e062610 100644
--- a/tests/end2end/features/downloads.feature
+++ b/tests/end2end/features/downloads.feature
@@ -579,9 +579,9 @@ Feature: Downloading things from a website.
And I wait until the download is finished
Then the downloaded file content-size should exist
- @posix
Scenario: Downloading to unwritable destination
- When I set storage -> prompt-download-directory to false
+ When the unwritable dir is unwritable
+ And I set storage -> prompt-download-directory to false
And I run :download http://localhost:(port)/data/downloads/download.bin --dest (tmpdir)/downloads/unwritable
Then the error "Download error: Permission denied" should be shown
diff --git a/tests/end2end/features/scroll.feature b/tests/end2end/features/scroll.feature
index a69b6ffae..28658e1e6 100644
--- a/tests/end2end/features/scroll.feature
+++ b/tests/end2end/features/scroll.feature
@@ -292,6 +292,13 @@ Feature: Scrolling
And I run :scroll-page --bottom-navigate next 0 1
Then data/hello2.txt should be loaded
+ Scenario: :scroll-page with --bottom-navigate when not at the bottom
+ When I run :scroll-px 0 10
+ And I wait until the scroll position changed
+ And I run :scroll-page --bottom-navigate next 0 1
+ Then the following tabs should be open:
+ - data/scroll/simple.html
+
Scenario: :scroll-page with --top-navigate
When I run :scroll-page --top-navigate prev 0 -1
Then data/hello3.txt should be loaded
diff --git a/tests/end2end/features/test_downloads_bdd.py b/tests/end2end/features/test_downloads_bdd.py
index 25eb52aad..4be175a66 100644
--- a/tests/end2end/features/test_downloads_bdd.py
+++ b/tests/end2end/features/test_downloads_bdd.py
@@ -21,6 +21,7 @@ import os
import sys
import shlex
+import pytest
import pytest_bdd as bdd
bdd.scenarios('downloads.feature')
@@ -53,6 +54,14 @@ def clean_old_downloads(quteproc):
quteproc.send_cmd(':download-clear')
+@bdd.when("the unwritable dir is unwritable")
+def check_unwritable(tmpdir):
+ unwritable = tmpdir / 'downloads' / 'unwritable'
+ if os.access(str(unwritable), os.W_OK):
+ # Docker container or similar
+ pytest.skip("Unwritable dir was writable")
+
+
@bdd.when("I wait until the download is finished")
def wait_for_download_finished(quteproc):
quteproc.wait_for(category='downloads', message='Download * finished')
diff --git a/tests/unit/misc/test_editor.py b/tests/unit/misc/test_editor.py
index de9125c8b..70886cda6 100644
--- a/tests/unit/misc/test_editor.py
+++ b/tests/unit/misc/test_editor.py
@@ -123,24 +123,30 @@ class TestFileHandling:
os.remove(filename)
- @pytest.mark.posix
def test_unreadable(self, message_mock, editor, caplog):
"""Test file handling when closing with an unreadable file."""
editor.edit("")
filename = editor._file.name
assert os.path.exists(filename)
os.chmod(filename, 0o077)
+ if os.access(filename, os.R_OK):
+ # Docker container or similar
+ pytest.skip("File was still readable")
+
with caplog.at_level(logging.ERROR):
editor._proc.finished.emit(0, QProcess.NormalExit)
assert not os.path.exists(filename)
msg = message_mock.getmsg(usertypes.MessageLevel.error)
assert msg.text.startswith("Failed to read back edited file: ")
- @pytest.mark.posix
def test_unwritable(self, monkeypatch, message_mock, editor, tmpdir,
caplog):
"""Test file handling when the initial file is not writable."""
tmpdir.chmod(0)
+ if os.access(str(tmpdir), os.W_OK):
+ # Docker container or similar
+ pytest.skip("File was still writable")
+
monkeypatch.setattr(editormod.tempfile, 'tempdir', str(tmpdir))
with caplog.at_level(logging.ERROR):
diff --git a/tox.ini b/tox.ini
index 722dad3c4..35bcb266c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,7 +4,7 @@
# and then run "tox" from this directory.
[tox]
-envlist = py34,py35,py36-cov,misc,vulture,flake8,pylint,pyroma,check-manifest
+envlist = py36-cov,misc,vulture,flake8,pylint,pyroma,check-manifest,eslint
distshare = {toxworkdir}
skipsdist = true