Searching for that error doesn't turn up many helpful results, but it
seems to be harmless and shown when downloading a file - it's also new
in Qt 5.6 it seems, so let's just ignore it.
The previous fix didn't work in situations where the web view was
actually focused, but had no focused element (like about:blank).
The new fix always works, and even is a lot simpler!
Fixes#504.
When a download is finished with `removed-finished-download` set to a
delay, it's removed via a singleshot QTimer.
However, when the window was closed in the meantime, the slot still was
executed by Qt, even though the DownloadManager was already deleted.
Fixes#1242
Issues #1269, #866
qutebrowser would crash when XDG_DOWNLOAD_DIR was set to some
non-absolute value (which should not happen, but it can) and
"storage -> download-dir" was empty, since when the user didn't give an
absolute filename, even the joined path of download_dir() (i.e.
XDG_DOWNLOAD_DIR in this case) and the filename was not absolute either.
Since the path was not absolute, create_full_filename returned None,
which meant that os.path.basename(self._filename) raised an exception.
Now we display an error message and fall back to $HOME.
Before we raised QtValueError (via qtutils.ensure_valid), but maybe there are
more callers out there which call fuzzy_url with an empty input - and it makes
more sense to raise InvalidUrlError which gets displayed to the user than
raising QtValueError which is more like an assertion.
This logged an error on Windows:
ERROR misc networkmanager:on_authentication_required:269 Unable to read the netrc file
Traceback (most recent call last):
File "c:\python34\Lib\netrc.py", line 27, in __init__
file = os.path.join(os.environ['HOME'], ".netrc")
File "C:\Users\florian\buildbot\slave\win8\build\.tox\py34\lib\os.py", line 633, in __getitem__
raise KeyError(key) from None
KeyError: 'HOME'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\florian\buildbot\slave\win8\build\qutebrowser\browser\network\networkmanager.py", line 262, in on_authentication_required
net = netrc.netrc()
File "c:\python34\Lib\netrc.py", line 29, in __init__
raise OSError("Could not find .netrc: $HOME is not set")
Since this case is pretty common, we don't want to log it - and checking the
variable beforehand is easier than parsing the exception message.
This should fix the failing tests on Windows.
Since 2a705e2eb6 non-specialized config types are
String. However, String had an overloaded complete() which defaulted to
returning None.
Now we use the normal complete() which relies on valid_values if completions
isn't given instead.
Fixes#1223.
When there was an error, the finished signal will be emitted too anyways, so if
we call cleanup here, we'll call it twice which means we'll get an exception.
Supersedes #1175.
tabs -> hide-auto was removed in d8017a04a8
because it was easier to do so compared to transforming it correctly when tabs
-> show was introduced. However, tabs -> auto-hide (the even older version)
wasn't removed, breaking config migration from earlier versions.
Fixes#1171.