126 docsPath = QDir( |
126 docsPath = QDir( |
127 QLibraryInfo.location(QLibraryInfo.DocumentationPath) + |
127 QLibraryInfo.location(QLibraryInfo.DocumentationPath) + |
128 QDir.separator() + "qch") |
128 QDir.separator() + "qch") |
129 elif version == 5: |
129 elif version == 5: |
130 docsPath = QLibraryInfo.location(QLibraryInfo.DocumentationPath) |
130 docsPath = QLibraryInfo.location(QLibraryInfo.DocumentationPath) |
131 if not os.path.isdir(docsPath): |
131 if not os.path.isdir(docsPath) or \ |
|
132 len(QDir(docsPath).entryList(["*.qch"])) == 0: |
132 # Qt installer is a bit buggy; it's missing a symbolic link |
133 # Qt installer is a bit buggy; it's missing a symbolic link |
133 docsPathList = QDir.fromNativeSeparators(docsPath).split("/") |
134 docsPathList = QDir.fromNativeSeparators(docsPath).split("/") |
134 docsPath = os.sep.join( |
135 docsPath = os.sep.join( |
135 docsPathList[:-3] + |
136 docsPathList[:-3] + |
136 ["Docs", "Qt-{0}".format(qVersion()[:3])]) |
137 ["Docs", "Qt-{0}".format(qVersion()[:3])]) |