From c422897abbd56ae4a70977397de2e1adcf1a1e0e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 4 Mar 2017 18:24:44 +0100 Subject: [PATCH] Make sure to process history after the rest of init is done Otherwise, with 5ccafd62d4d7571e4b87bd07839f9a1dffe9a85d the history starts processing before the webview opened, and opening it is delayed until the whole history is read. Instead, call _process_args directly (I'm not even sure why it was using a 0ms QTimer...) and schedule _init_late_modules after everything is really done. --- qutebrowser/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 50965074b..09b2adfc1 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -142,8 +142,7 @@ def init(args, crash_handler): pre_text="Error while initializing") sys.exit(usertypes.Exit.err_init) - QTimer.singleShot(0, functools.partial(_process_args, args)) - QTimer.singleShot(10, functools.partial(_init_late_modules, args)) + _process_args(args) log.init.debug("Initializing eventfilter...") event_filter = EventFilter(qApp) @@ -161,6 +160,8 @@ def init(args, crash_handler): macros.init() + QTimer.singleShot(10, functools.partial(_init_late_modules, args)) + log.init.debug("Init done!") crash_handler.raise_crashdlg()