Improve earlyinit Qt/PyQt version messages
This commit is contained in:
parent
9b07a9f77f
commit
a179d6a738
@ -262,17 +262,19 @@ def get_backend(args):
|
|||||||
|
|
||||||
def check_qt_version(backend):
|
def check_qt_version(backend):
|
||||||
"""Check if the Qt version is recent enough."""
|
"""Check if the Qt version is recent enough."""
|
||||||
from PyQt5.QtCore import qVersion, PYQT_VERSION
|
from PyQt5.QtCore import qVersion, PYQT_VERSION, PYQT_VERSION_STR
|
||||||
from qutebrowser.utils import qtutils
|
from qutebrowser.utils import qtutils
|
||||||
if qtutils.version_check('5.2.0', operator.lt):
|
if (qtutils.version_check('5.2.0', operator.lt) or
|
||||||
text = ("Fatal error: Qt and PyQt >= 5.2.0 are required, but {} is "
|
PYQT_VERSION < 0x050200):
|
||||||
"installed.".format(qVersion()))
|
text = ("Fatal error: Qt and PyQt >= 5.2.0 are required, but Qt {} / "
|
||||||
|
"PyQt {} is installed.".format(qVersion(), PYQT_VERSION_STR))
|
||||||
_die(text)
|
_die(text)
|
||||||
elif (backend == 'webengine' and (
|
elif (backend == 'webengine' and (
|
||||||
qtutils.version_check('5.7.0', operator.lt) or
|
qtutils.version_check('5.7.0', operator.lt) or
|
||||||
PYQT_VERSION < 0x050701)):
|
PYQT_VERSION < 0x050701)):
|
||||||
text = ("Fatal error: Qt and PyQt >= 5.7.1 are required for "
|
text = ("Fatal error: Qt and PyQt >= 5.7.1 are required for "
|
||||||
"QtWebEngine support, but {} is installed.".format(qVersion()))
|
"QtWebEngine support, but Qt {} / PyQt {} is installed."
|
||||||
|
.format(qVersion(), PYQT_VERSION_STR))
|
||||||
_die(text)
|
_die(text)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user