From b10d84f31a511dd8e1a36019b60235f6a7f286ed Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 21 Feb 2019 14:11:30 +0100 Subject: [PATCH] Warn when combining Qt 5.12 with older Qt Fixes #4581 --- qutebrowser/misc/earlyinit.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/qutebrowser/misc/earlyinit.py b/qutebrowser/misc/earlyinit.py index a2db81764..61ae1dbfc 100644 --- a/qutebrowser/misc/earlyinit.py +++ b/qutebrowser/misc/earlyinit.py @@ -173,8 +173,10 @@ def check_qt_version(): PYQT_VERSION_STR) from pkg_resources import parse_version from qutebrowser.utils import log + parsed_qversion = parse_version(qVersion()) + if (QT_VERSION < 0x050701 or PYQT_VERSION < 0x050700 or - parse_version(qVersion()) < parse_version('5.7.1')): + parsed_qversion < parse_version('5.7.1')): text = ("Fatal error: Qt >= 5.7.1 and PyQt >= 5.7 are required, " "but Qt {} / PyQt {} is installed.".format(qt_version(), PYQT_VERSION_STR)) @@ -184,6 +186,12 @@ def check_qt_version(): log.init.warning("Running qutebrowser with Qt 5.8 is untested and " "unsupported!") + if (parsed_qversion >= parse_version('5.12') and + (PYQT_VERSION < 0x050c00 or QT_VERSION < 0x050c00)): + log.init.warning("Combining PyQt {} with Qt {} is unsupported! Ensure " + "all versions are newer than 5.12 to avoid potential " + "issues.".format(PYQT_VERSION_STR, qt_version())) + def check_ssl_support(): """Check if SSL support is available."""