8 documentation database. |
8 documentation database. |
9 """ |
9 """ |
10 |
10 |
11 import os |
11 import os |
12 |
12 |
13 from PyQt5.QtCore import ( |
13 from PyQt6.QtCore import ( |
14 pyqtSignal, QThread, Qt, QMutex, QDateTime, QDir, QLibraryInfo, QFileInfo |
14 pyqtSignal, QThread, Qt, QMutex, QDateTime, QDir, QLibraryInfo, QFileInfo |
15 ) |
15 ) |
16 from PyQt5.QtHelp import QHelpEngineCore |
16 from PyQt6.QtHelp import QHelpEngineCore |
17 |
17 |
18 from eric7config import getConfig |
18 from eric7config import getConfig |
19 |
19 |
20 from Globals import qVersionTuple |
20 from Globals import qVersionTuple |
21 |
21 |
125 if len(lst) == 2: |
125 if len(lst) == 2: |
126 qchFile = lst[1] |
126 qchFile = lst[1] |
127 |
127 |
128 if version == 4: |
128 if version == 4: |
129 docsPath = QDir( |
129 docsPath = QDir( |
130 QLibraryInfo.location( |
130 QLibraryInfo.path( |
131 QLibraryInfo.LibraryLocation.DocumentationPath) + |
131 QLibraryInfo.LibraryPath.DocumentationPath) + |
132 QDir.separator() + "qch") |
132 QDir.separator() + "qch") |
133 elif version == 5: |
133 elif version == 5: |
134 docsPath = QLibraryInfo.location( |
134 docsPath = QLibraryInfo.path( |
135 QLibraryInfo.LibraryLocation.DocumentationPath) |
135 QLibraryInfo.LibraryPath.DocumentationPath) |
136 if ( |
136 if ( |
137 not os.path.isdir(docsPath) or |
137 not os.path.isdir(docsPath) or |
138 len(QDir(docsPath).entryList(["*.qch"])) == 0 |
138 len(QDir(docsPath).entryList(["*.qch"])) == 0 |
139 ): |
139 ): |
140 docsPathList = QDir.fromNativeSeparators(docsPath).split("/") |
140 docsPathList = QDir.fromNativeSeparators(docsPath).split("/") |