Enforce Qt >= 5.6.0 for QtWebEngine

This commit is contained in:
Florian Bruhin 2016-09-07 17:31:48 +02:00
parent 02bd42cbed
commit 4d91ccfea5

View File

@ -220,7 +220,7 @@ def check_pyqt_core():
sys.exit(1)
def check_qt_version():
def check_qt_version(args):
"""Check if the Qt version is recent enough."""
from PyQt5.QtCore import qVersion
from qutebrowser.utils import qtutils
@ -228,6 +228,10 @@ def check_qt_version():
text = ("Fatal error: Qt and PyQt >= 5.2.0 are required, but {} is "
"installed.".format(qVersion()))
_die(text)
elif args.backend == 'webengine' and qtutils.version_check('5.6.0', operator.lt):
text = ("Fatal error: Qt and PyQt >= 5.6.0 are required for "
"QtWebEngine support, but {} is installed.".format(qVersion()))
_die(text)
def check_ssl_support():
@ -332,7 +336,7 @@ 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.
check_qt_version()
check_qt_version(args)
remove_inputhook()
check_libraries(args)
check_ssl_support()