colorlog was problematic for various reasons:
- Not commonly packaged for Linux distributions
- Calling colorama.init() automatically on import
- Not supporting {foo} log formatting
- Not supporting an easy way to turn colors off
Instead we now do the log coloring by hand, which is simpler and means
everyone will have colored logs.
When using :tab-prev/:tab-next (or :tab-focus which uses :tab-next
internally) immediately after the last tab, those functions could be
called with 0 tabs open, which caused a ZeroDivisionError when trying to
do % 0.
Fixes#1448.
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.