216 @return tuple containing the Chromium version, the Chromium security patch |
216 @return tuple containing the Chromium version, the Chromium security patch |
217 version and the QtWebEngine version |
217 version and the QtWebEngine version |
218 @rtype tuple of (str, str, str) |
218 @rtype tuple of (str, str, str) |
219 """ |
219 """ |
220 try: |
220 try: |
221 from PyQt6.QtWebEngineCore import ( |
221 from PyQt6.QtWebEngineCore import ( # __IGNORE_WARNING_I10__ |
222 qWebEngineChromiumSecurityPatchVersion, |
222 qWebEngineChromiumSecurityPatchVersion, |
223 qWebEngineChromiumVersion, |
223 qWebEngineChromiumVersion, |
224 qWebEngineVersion, |
224 qWebEngineVersion, |
225 ) |
225 ) |
226 |
226 |
227 chromiumVersion = qWebEngineChromiumVersion() |
227 chromiumVersion = qWebEngineChromiumVersion() |
228 chromiumSecurityVersion = qWebEngineChromiumSecurityPatchVersion() |
228 chromiumSecurityVersion = qWebEngineChromiumSecurityPatchVersion() |
229 webengineVersion = qWebEngineVersion() |
229 webengineVersion = qWebEngineVersion() |
230 except ImportError: |
230 except ImportError: |
231 # backwards compatibility for PyQt < 6.3.1 |
231 # backwards compatibility for PyQt < 6.3.1 |
232 from PyQt6.QtWebEngineCore import QWebEngineProfile |
232 from PyQt6.QtWebEngineCore import QWebEngineProfile # __IGNORE_WARNING_I10__ |
233 |
233 |
234 useragent = QWebEngineProfile.defaultProfile().httpUserAgent() |
234 useragent = QWebEngineProfile.defaultProfile().httpUserAgent() |
235 match = re.search(r"""Chrome/([\d.]+)""", useragent) |
235 match = re.search(r"""Chrome/([\d.]+)""", useragent) |
236 chromiumVersion = ( |
236 chromiumVersion = ( |
237 match.group(1) |
237 match.group(1) |