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-06-22 17:41:12 +0200
commitaf1c7c0d02b8e2bdc5bdf466e540a37142afbd5e (patch)
treefe4209ee9b4e37c06d6d0d6c698188c15c679229
parent98beb50e644c2ad3a3a3b2980fbcba6fdce2442c (diff)
downloadqutebrowser-af1c7c0d02b8e2bdc5bdf466e540a37142afbd5e.tar.gz
qutebrowser-af1c7c0d02b8e2bdc5bdf466e540a37142afbd5e.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 23ac05d8d..4ca306b61 100644
--- a/qutebrowser/utils/version.py
+++ b/qutebrowser/utils/version.py
@@ -401,10 +401,19 @@ 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', []),
]
+
+ 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]