summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-05-30 18:17:31 +0200
committerFlorian Bruhin <me@the-compiler.org>2022-08-23 18:31:41 +0200
commite0bf66a19171386a29d9d0c28d6d8b37c2879bdb (patch)
treef315793c9cd6839fbcd071e3f12bfc2974322530
parentf6aeb11f34b8bb741c3d745dcf46da5d239d0060 (diff)
downloadqutebrowser-e0bf66a19171386a29d9d0c28d6d8b37c2879bdb.tar.gz
qutebrowser-e0bf66a19171386a29d9d0c28d6d8b37c2879bdb.zip
Adjust _create_module_info for Qt 6
-rw-r--r--qutebrowser/utils/version.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py
index fe2f32bb3..a8873ed78 100644
--- a/qutebrowser/utils/version.py
+++ b/qutebrowser/utils/version.py
@@ -401,11 +401,20 @@ def _create_module_info() -> Dict[str, ModuleInfo]:
('pygments', ['__version__']),
('yaml', ['__version__']),
('adblock', ['__version__'], "0.3.2"),
- ('PyQt5.QtWebEngineWidgets', []),
- ('PyQt5.QtWebEngine', ['PYQT_WEBENGINE_VERSION_STR']),
- ('PyQt5.QtWebKitWidgets', []),
('objc', ['__version__']),
]
+
+ if machinery.IS_QT5:
+ packages += [
+ ('PyQt5.QtWebEngineWidgets', []),
+ ('PyQt5.QtWebEngine', ['PYQT_WEBENGINE_VERSION_STR']),
+ ('PyQt5.QtWebKitWidgets', []),
+ ]
+ elif machinery.IS_QT6:
+ packages.append(('PyQt6.QtWebEngineCore', ['PYQT_WEBENGINE_VERSION_STR']))
+ else:
+ raise utils.Unreachable()
+
# Mypy doesn't understand this. See https://github.com/python/mypy/issues/9706
return {
name: ModuleInfo(name, *args) # type: ignore[arg-type, misc]