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: |