src/eric7/WebBrowser/QtHelp/HelpDocsInstaller.py

branch
eric7
changeset 9286
f6f950e4c8f0
parent 9221
bf71ee032bb4
child 9413
80c06d472826
equal deleted inserted replaced
9285:d697b03e3bcc 9286:f6f950e4c8f0
197 197
198 if version == 5: 198 if version == 5:
199 docsPath = pathlib.Path( 199 docsPath = pathlib.Path(
200 QLibraryInfo.path(QLibraryInfo.LibraryPath.DocumentationPath) 200 QLibraryInfo.path(QLibraryInfo.LibraryPath.DocumentationPath)
201 ) 201 )
202 if not docsPath.is_dir() or len(docsPath.glob("*.qch")) == 0: 202 if not docsPath.is_dir() or len(list(docsPath.glob("*.qch"))) == 0:
203 docsPath = ( 203 docsPath = (
204 docsPath.parents[2] / "Docs" / "Qt-{0}.{1}".format(*qVersionTuple()) 204 docsPath.parents[2] / "Docs" / "Qt-{0}.{1}".format(*qVersionTuple())
205 ) 205 )
206 else: 206 else:
207 # unsupported Qt version 207 # unsupported Qt version
208 return False 208 return False
209 209
210 files = docsPath.glob("*.qch") 210 files = list(docsPath.glob("*.qch"))
211 if not files: 211 if not files:
212 engine.setCustomValue(versionKey, "|") 212 engine.setCustomValue(versionKey, "|")
213 return False 213 return False
214 214
215 for f in files: 215 for f in files:
269 if len(lst) == 2: 269 if len(lst) == 2:
270 qchFile = lst[1] 270 qchFile = lst[1]
271 271
272 docsPath = pathlib.Path(getConfig("ericDocDir")) / "Help" 272 docsPath = pathlib.Path(getConfig("ericDocDir")) / "Help"
273 273
274 files = docsPath.glob("*.qch") 274 files = list(docsPath.glob("*.qch"))
275 if not files: 275 if not files:
276 engine.setCustomValue(versionKey, "|") 276 engine.setCustomValue(versionKey, "|")
277 return False 277 return False
278 278
279 for f in files: 279 for f in files:

eric ide

mercurial