src/eric7/WebBrowser/QtHelp/HelpDocsInstaller.py

branch
eric7
changeset 9624
b47dfa7a137d
parent 9473
3f23dbf37dbe
child 9653
e67609152c5e
equal deleted inserted replaced
9623:9c1f429cb56b 9624:b47dfa7a137d
12 import pathlib 12 import pathlib
13 13
14 from PyQt6.QtCore import QLibraryInfo, QMutex, QThread, pyqtSignal 14 from PyQt6.QtCore import QLibraryInfo, QMutex, QThread, pyqtSignal
15 from PyQt6.QtHelp import QHelpEngineCore 15 from PyQt6.QtHelp import QHelpEngineCore
16 16
17 from eric7.Globals import getConfig, qVersionTuple 17 from eric7.Globals import getConfig
18 from eric7.SystemUtilities import QtUtilities
18 19
19 20
20 class HelpDocsInstaller(QThread): 21 class HelpDocsInstaller(QThread):
21 """ 22 """
22 Class implementing the worker thread populating and updating the QtHelp 23 Class implementing the worker thread populating and updating the QtHelp
205 docsPath = pathlib.Path( 206 docsPath = pathlib.Path(
206 QLibraryInfo.path(QLibraryInfo.LibraryPath.DocumentationPath) 207 QLibraryInfo.path(QLibraryInfo.LibraryPath.DocumentationPath)
207 ) 208 )
208 if not docsPath.is_dir() or len(list(docsPath.glob("*.qch"))) == 0: 209 if not docsPath.is_dir() or len(list(docsPath.glob("*.qch"))) == 0:
209 docsPath = ( 210 docsPath = (
210 docsPath.parents[2] / "Docs" / "Qt-{0}.{1}".format(*qVersionTuple()) 211 docsPath.parents[2]
212 / "Docs"
213 / "Qt-{0}.{1}".format(*QtUtilities.qVersionTuple())
211 ) 214 )
212 else: 215 else:
213 # unsupported Qt version 216 # unsupported Qt version
214 return False 217 return False
215 218

eric ide

mercurial