Revert "Reorganize earlyinit checks"

This reverts commit 6f3f9ede01a6b30b105d5110a48cfea592e8db52.
This commit is contained in:
Florian Bruhin 2017-04-13 16:23:50 +02:00
parent d0461eece3
commit 048aec1aa6

View File

@ -322,7 +322,8 @@ def check_libraries(backend):
if backend == 'webengine':
modules['PyQt5.QtWebEngineWidgets'] = _missing_str("QtWebEngine",
webengine=True)
elif backend == 'webkit':
else:
assert backend == 'webkit'
modules['PyQt5.QtWebKit'] = _missing_str("PyQt5.QtWebKit")
modules['PyQt5.QtWebKitWidgets'] = _missing_str(
"PyQt5.QtWebKitWidgets")
@ -406,15 +407,10 @@ def earlyinit(args):
fix_harfbuzz(args)
# Now we can be sure QtCore is available, so we can print dialogs on
# errors, so people only using the GUI notice them as well.
#
# First do some early version checks, without knowing the backend.
check_qt_version(None)
remove_inputhook()
check_libraries(None)
check_ssl_support()
check_optimize_flag()
# Now find out the backend to use, and do the rest of the checks
backend = get_backend(args)
check_qt_version(backend)
remove_inputhook()
check_libraries(backend)
check_ssl_support()
check_optimize_flag()
set_backend(backend)