src/eric7/WebBrowser/Tools/WebBrowserTools.py

branch
eric7
changeset 11148
15e30f0c76a8
parent 11090
f5f5f5803935
equal deleted inserted replaced
11147:dee6e106b4d3 11148:15e30f0c76a8
224 @return tuple containing the Chromium version, the Chromium security patch 224 @return tuple containing the Chromium version, the Chromium security patch
225 version and the QtWebEngine version 225 version and the QtWebEngine version
226 @rtype tuple of (str, str, str) 226 @rtype tuple of (str, str, str)
227 """ 227 """
228 try: 228 try:
229 from PyQt6.QtWebEngineCore import ( # __IGNORE_WARNING_I10__ 229 from PyQt6.QtWebEngineCore import ( # __IGNORE_WARNING_I-10__
230 qWebEngineChromiumSecurityPatchVersion, 230 qWebEngineChromiumSecurityPatchVersion,
231 qWebEngineChromiumVersion, 231 qWebEngineChromiumVersion,
232 qWebEngineVersion, 232 qWebEngineVersion,
233 ) 233 )
234 234
235 chromiumVersion = qWebEngineChromiumVersion() 235 chromiumVersion = qWebEngineChromiumVersion()
236 chromiumSecurityVersion = qWebEngineChromiumSecurityPatchVersion() 236 chromiumSecurityVersion = qWebEngineChromiumSecurityPatchVersion()
237 webengineVersion = qWebEngineVersion() 237 webengineVersion = qWebEngineVersion()
238 except ImportError: 238 except ImportError:
239 # backwards compatibility for PyQt < 6.3.1 239 # backwards compatibility for PyQt < 6.3.1
240 from PyQt6.QtWebEngineCore import QWebEngineProfile # __IGNORE_WARNING_I10__ 240 from PyQt6.QtWebEngineCore import QWebEngineProfile # __IGNORE_WARNING_I-10__
241 241
242 useragent = QWebEngineProfile.defaultProfile().httpUserAgent() 242 useragent = QWebEngineProfile.defaultProfile().httpUserAgent()
243 match = re.search(r"""Chrome/([\d.]+)""", useragent) 243 match = re.search(r"""Chrome/([\d.]+)""", useragent)
244 chromiumVersion = ( 244 chromiumVersion = (
245 match.group(1) 245 match.group(1)

eric ide

mercurial