The toggle option was failing to fire the changed signal when it removed
a bookmark. This means the bookmark file would not be marked as dirty,
and would not be saved on exit/autosave (unless another change was
made).
We originally made it per-window in b502280c06 for
issue #228, but that was back when we still needed window IDs for stuff like
message.info.
Nowadays, there's no reason for it to be per-window anymore. The rest of the
download code can deal with one global download manager (because QtWebEngine has
one), and apart from QNAM code which wasn't used here anyways (as tab_id=None)
there was nothing using the window ID anymore.
Also see #3456 which was the original motivation for this change.
What we actually want to test here is that the given type directory is created
and has the correct permission, we don't care much about the basedir itself.
Also, the download dir is not created automatically.
This test failed on Python 3.7 because intermediate directories now aren't
created with the given mode anymore:
https://bugs.python.org/issue19930https://docs.python.org/3.7/whatsnew/3.7.html#changes-in-the-python-api
After reading https://pyyaml.org/wiki/PyYAMLDocumentation again, turns out
Loader.add_constructor and .add_implicit_resolver are actually *class* methods.
In other words, we've been adding dozens of constructors/resolvers to the
default YAML loader object, causing it to slow down massively in other tests
which call configdata.init().
Instead, create our own loader class and only add them once there.
I'm still not sure why this caused the duration to increase with every YAML load
though - that might still be some kind of bug in PyYAML.
Fixes#2777
We call 'update_tab_titles' a lot of times which calls 'setTabText' on
every tab. 'setTabText' calls tabSizeHint and minTabSizeHint on every
tab as well, meaning this is an n^2 operation repeated many times.
First, this prevents setTabText from being called unless it's needed,
removing most of the work done.
Second, I remove tabs in reverse, to avoid recomputing the above for
every tab on shutdown (which is at least n^3)