Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
356eb7e5e7 | ||
|
|
bdd2afa1a2 | ||
|
|
e02ff26d0e | ||
|
|
128fb2826a | ||
|
|
3521ee16e4 | ||
|
|
af5cb36591 | ||
|
|
8aaae5b78c | ||
|
|
ced87b163f | ||
|
|
c5459abb65 | ||
|
|
83b7c0dd6f | ||
|
|
93fff9a69c | ||
|
|
b2247fa406 | ||
|
|
fafba9af3f |
@@ -14,6 +14,17 @@ This project adheres to http://semver.org/[Semantic Versioning].
|
||||
// `Fixed` for any bug fixes.
|
||||
// `Security` to invite users to upgrade in case of vulnerabilities.
|
||||
|
||||
v0.6.1
|
||||
-----
|
||||
|
||||
Fixed
|
||||
~~~~~~
|
||||
|
||||
- Fixed broken cheatsheet image which was missing from package
|
||||
- Fixed occasional crash when switching/disconnecting monitors
|
||||
- Fixed crash when downloading non-ascii files with a broken locale (`LC_ALL=C`)
|
||||
- Added workaround for a Qt/PyQt bug which is too weird to describe here
|
||||
|
||||
v0.6.0
|
||||
------
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
recursive-include qutebrowser *.py
|
||||
recursive-include qutebrowser/html *.html
|
||||
recursive-include qutebrowser/img *.svg *.png
|
||||
recursive-include qutebrowser/test *.py
|
||||
recursive-include qutebrowser/javascript *.js
|
||||
graft qutebrowser/html
|
||||
graft qutebrowser/3rdparty
|
||||
graft icons
|
||||
graft doc/img
|
||||
|
||||
@@ -8,7 +8,7 @@ time, use the `:help` command.
|
||||
What to do now
|
||||
--------------
|
||||
|
||||
* View the http://qutebrowser.org/img/cheatsheet-big.png[key binding cheatsheet]
|
||||
* View the link:http://qutebrowser.org/img/cheatsheet-big.png[key binding cheatsheet]
|
||||
to make yourself familiar with the key bindings: +
|
||||
image:http://qutebrowser.org/img/cheatsheet-small.png["qutebrowser key binding cheatsheet",link="http://qutebrowser.org/img/cheatsheet-big.png"]
|
||||
* Run `:adblock-update` to download adblock lists and activate adblocking.
|
||||
|
||||
@@ -28,7 +28,7 @@ __copyright__ = "Copyright 2014-2016 Florian Bruhin (The Compiler)"
|
||||
__license__ = "GPL"
|
||||
__maintainer__ = __author__
|
||||
__email__ = "mail@qutebrowser.org"
|
||||
__version_info__ = (0, 6, 0)
|
||||
__version_info__ = (0, 6, 1)
|
||||
__version__ = '.'.join(str(e) for e in __version_info__)
|
||||
__description__ = "A keyboard-driven, vim-like browser based on PyQt5 and QtWebKit."
|
||||
|
||||
|
||||
@@ -104,6 +104,11 @@ def create_full_filename(basename, filename):
|
||||
Return:
|
||||
The full absolute path, or None if filename creation was not possible.
|
||||
"""
|
||||
# Remove chars which can't be encoded in the filename encoding.
|
||||
# See https://github.com/The-Compiler/qutebrowser/issues/427
|
||||
encoding = sys.getfilesystemencoding()
|
||||
filename = utils.force_encoding(filename, encoding)
|
||||
basename = utils.force_encoding(basename, encoding)
|
||||
if os.path.isabs(filename) and os.path.isdir(filename):
|
||||
# We got an absolute directory from the user, so we save it under
|
||||
# the default filename in that directory.
|
||||
@@ -523,10 +528,6 @@ class DownloadItem(QObject):
|
||||
"existing: {}, fileobj {}".format(
|
||||
filename, self._filename, self.fileobj))
|
||||
filename = os.path.expanduser(filename)
|
||||
# Remove chars which can't be encoded in the filename encoding.
|
||||
# See https://github.com/The-Compiler/qutebrowser/issues/427
|
||||
encoding = sys.getfilesystemencoding()
|
||||
filename = utils.force_encoding(filename, encoding)
|
||||
self._filename = create_full_filename(self.basename, filename)
|
||||
if self._filename is None:
|
||||
# We only got a filename (without directory) or a relative path
|
||||
|
||||
@@ -27,7 +27,7 @@ from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer, QUrl
|
||||
from PyQt5.QtGui import QPalette
|
||||
from PyQt5.QtWidgets import QApplication, QStyleFactory
|
||||
from PyQt5.QtWebKit import QWebSettings
|
||||
from PyQt5.QtWebKitWidgets import QWebView, QWebPage
|
||||
from PyQt5.QtWebKitWidgets import QWebView, QWebPage, QWebFrame
|
||||
|
||||
from qutebrowser.config import config
|
||||
from qutebrowser.keyinput import modeman
|
||||
@@ -352,9 +352,14 @@ class WebView(QWebView):
|
||||
frame = self.page().mainFrame()
|
||||
frame.javaScriptWindowObjectCleared.connect(self.add_js_bridge)
|
||||
|
||||
@pyqtSlot(QWebFrame)
|
||||
def add_js_bridge(self):
|
||||
"""Add the javascript bridge for qute:... pages."""
|
||||
frame = self.sender()
|
||||
if not isinstance(frame, QWebFrame):
|
||||
log.webview.error("Got non-QWebFrame in add_js_bridge")
|
||||
return
|
||||
|
||||
if frame.url().scheme() == 'qute':
|
||||
bridge = objreg.get('js-bridge')
|
||||
frame.addToJavaScriptWindowObject('qute', bridge)
|
||||
|
||||
@@ -241,7 +241,9 @@ class SessionManager(QObject):
|
||||
log.sessions.debug("Saving session {} to {}...".format(name, path))
|
||||
if last_window:
|
||||
data = self._last_window_session
|
||||
assert data is not None
|
||||
if data is None:
|
||||
log.sessions.error("last_window_session is None while saving!")
|
||||
return
|
||||
else:
|
||||
data = self._save_all()
|
||||
log.sessions.vdebug("Saving data: {}".format(data))
|
||||
|
||||
@@ -25,7 +25,7 @@ import os.path
|
||||
|
||||
from PyQt5.QtCore import QCoreApplication, QStandardPaths
|
||||
|
||||
from qutebrowser.utils import log, qtutils
|
||||
from qutebrowser.utils import log, qtutils, debug
|
||||
|
||||
|
||||
# The argparse namespace passed to init()
|
||||
@@ -124,6 +124,8 @@ def _writable_location(typ):
|
||||
"""Wrapper around QStandardPaths.writableLocation."""
|
||||
with qtutils.unset_organization():
|
||||
path = QStandardPaths.writableLocation(typ)
|
||||
typ_str = debug.qenum_key(QStandardPaths, typ)
|
||||
log.misc.debug("writable location for {}: {}".format(typ_str, path))
|
||||
if not path:
|
||||
raise ValueError("QStandardPaths returned an empty value!")
|
||||
# Qt seems to use '/' as path separator even on Windows...
|
||||
|
||||
@@ -91,7 +91,7 @@ def smoke_test(executable):
|
||||
def build_windows():
|
||||
"""Build windows executables/setups."""
|
||||
utils.print_title("Updating 3rdparty content")
|
||||
update_3rdparty.main()
|
||||
update_3rdparty.update_pdfjs()
|
||||
|
||||
utils.print_title("Building Windows binaries")
|
||||
parts = str(sys.version_info.major), str(sys.version_info.minor)
|
||||
|
||||
@@ -87,7 +87,8 @@ def get_build_exe_options(skip_html=False):
|
||||
'includes': [],
|
||||
'excludes': ['tkinter'],
|
||||
'packages': ['pygments', 'pkg_resources._vendor.packaging',
|
||||
'pkg_resources._vendor.pyparsing'],
|
||||
'pkg_resources._vendor.pyparsing',
|
||||
'pkg_resources._vendor.six'],
|
||||
}
|
||||
|
||||
|
||||
|
||||
BIN
tests/integration/data/downloads/ä-issue908.bin
Normal file
BIN
tests/integration/data/downloads/ä-issue908.bin
Normal file
Binary file not shown.
@@ -17,7 +17,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""Test starting qutebrowser with various commandline arguments."""
|
||||
"""Test starting qutebrowser with special arguments/environments."""
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -51,3 +51,23 @@ def test_no_config(tmpdir, quteproc_new):
|
||||
quteproc_new.start(args, env=env)
|
||||
quteproc_new.send_cmd(':quit')
|
||||
quteproc_new.wait_for_quit()
|
||||
|
||||
|
||||
@pytest.mark.linux
|
||||
def test_ascii_locale(httpbin, tmpdir, quteproc_new):
|
||||
"""Test downloads with LC_ALL=C set.
|
||||
|
||||
https://github.com/The-Compiler/qutebrowser/issues/908
|
||||
"""
|
||||
args = ['--debug', '--no-err-windows', '--temp-basedir', 'about:blank']
|
||||
quteproc_new.start(args, env={'LC_ALL': 'C'})
|
||||
quteproc_new.set_setting('storage', 'download-directory', str(tmpdir))
|
||||
quteproc_new.set_setting('storage', 'prompt-download-directory', 'false')
|
||||
url = 'http://localhost:{port}/data/downloads/ä-issue908.bin'.format(
|
||||
port=httpbin.port)
|
||||
quteproc_new.send_cmd(':download {}'.format(url))
|
||||
quteproc_new.send_cmd(':quit')
|
||||
quteproc_new.wait_for_quit()
|
||||
|
||||
assert len(tmpdir.listdir()) == 1
|
||||
assert (tmpdir / '?-issue908.bin').exists()
|
||||
@@ -321,7 +321,7 @@ class TestDefaultConfig:
|
||||
If it did change, place a new qutebrowser-vx.y.z.conf in old_configs
|
||||
and then increment the version.
|
||||
"""
|
||||
assert qutebrowser.__version__ == '0.6.0'
|
||||
assert qutebrowser.__version__ == '0.6.1'
|
||||
|
||||
@pytest.mark.parametrize('filename',
|
||||
os.listdir(os.path.join(os.path.dirname(__file__), 'old_configs')),
|
||||
|
||||
@@ -447,10 +447,14 @@ class TestSave:
|
||||
sess_man.save(str(session_path))
|
||||
assert 'session' not in state_config['general']
|
||||
|
||||
def test_last_window_session_none(self, sess_man, tmpdir):
|
||||
def test_last_window_session_none(self, caplog, sess_man, tmpdir):
|
||||
session_path = tmpdir / 'foo.yml'
|
||||
with pytest.raises(AssertionError):
|
||||
with caplog.at_level(logging.ERROR):
|
||||
sess_man.save(str(session_path), last_window=True)
|
||||
|
||||
assert len(caplog.records) == 1
|
||||
msg = "last_window_session is None while saving!"
|
||||
assert caplog.records[0].msg == msg
|
||||
assert not session_path.exists()
|
||||
|
||||
def test_last_window_session(self, sess_man, tmpdir):
|
||||
|
||||
Reference in New Issue
Block a user