This adds a Table of Contents to the installation instructions to
improve the navigation within the document.
I decided to use the command line to configure the TOC because there
were problems with using just using an attribute entry in the document
header.
Specifically the insertion of the `header.asciidoc` into the resulting
HTML file prevented the attribute entry approach from working.
The TOC can now be inserted into any doc file using
toc::[]
Turns out QWebEngineSettings.globalSettings() only sets things on the default
profile. We now get everything from the default profile settings, but set it on
both the default and the private profile.
Fixes#2638
(cherry picked from commit b11a4388cd10b6ff2fd917fca689ebdc50d581ae)
If we don't wait here, we might end up running the subsequent commands (like
:command-history-prev) on the old window while it's still closing, causing an
exception at least on AppVeyor:
Traceback (most recent call last):
File "C:\projects\qutebrowser\qutebrowser\app.py", line 110, in <lambda>
target_arg=target_arg))
File "C:\projects\qutebrowser\qutebrowser\app.py", line 265, in process_pos_args
win_id = mainwindow.get_window(via_ipc, force_tab=True)
File "C:\projects\qutebrowser\qutebrowser\mainwindow\mainwindow.py", line 89, in get_window
window.setWindowState(window.windowState() & ~Qt.WindowMinimized)
RuntimeError: wrapped C/C++ object of type MainWindow has been deleted
This tried to assert that we never create a DiskCache object when private
browsing is turned on. However, when initializing, we still create a global
DiskCache, so this will hit when qutebrowser is started with private browsing
turned on via the config.
We could just not create the DiskCache at all when started in private browsing
mode, however we might still need it later when opening a non-private window.
There's only one global DownloadManager with its own NAM (for downloads not
associated with a page). We can't really decide whether that should be private
or not, so as a best-effort approximation we simply make it private if private
browsing was turned on when starting qutebrowser.
If we simply use sorted() on a dict, we define insert before private-command,
which means the statusbar isn't going to be green when in insert mode while
private browsing.