Helpviewer/HelpDocsInstaller.py

changeset 3670
f0cb7579c0b4
parent 3656
441956d8fce5
child 3992
537d57307ba8
equal deleted inserted replaced
3669:ac84ac3c0f05 3670:f0cb7579c0b4
12 12
13 from PyQt5.QtCore import pyqtSignal, QThread, Qt, QMutex, QDateTime, QDir, \ 13 from PyQt5.QtCore import pyqtSignal, QThread, Qt, QMutex, QDateTime, QDir, \
14 QLibraryInfo, QFileInfo 14 QLibraryInfo, QFileInfo
15 from PyQt5.QtHelp import QHelpEngineCore 15 from PyQt5.QtHelp import QHelpEngineCore
16 16
17 from eric5config import getConfig 17 from eric6config import getConfig
18 18
19 19
20 class HelpDocsInstaller(QThread): 20 class HelpDocsInstaller(QThread):
21 """ 21 """
22 Class implementing the worker thread populating and updating the QtHelp 22 Class implementing the worker thread populating and updating the QtHelp
83 engine = None 83 engine = None
84 self.__mutex.unlock() 84 self.__mutex.unlock()
85 return 85 return
86 self.__mutex.unlock() 86 self.__mutex.unlock()
87 87
88 changes |= self.__installEric5Doc(engine) 88 changes |= self.__installEric6Doc(engine)
89 engine = None 89 engine = None
90 del engine 90 del engine
91 self.docsInstalled.emit(changes) 91 self.docsInstalled.emit(changes)
92 92
93 def __installQtDoc(self, name, version, engine): 93 def __installQtDoc(self, name, version, engine):
162 fi.absoluteFilePath()) 162 fi.absoluteFilePath())
163 return True 163 return True
164 164
165 return False 165 return False
166 166
167 def __installEric5Doc(self, engine): 167 def __installEric6Doc(self, engine):
168 """ 168 """
169 Private method to install/update the eric5 help documentation. 169 Private method to install/update the eric6 help documentation.
170 170
171 @param engine reference to the help engine (QHelpEngineCore) 171 @param engine reference to the help engine (QHelpEngineCore)
172 @return flag indicating success (boolean) 172 @return flag indicating success (boolean)
173 """ 173 """
174 versionKey = "eric5_ide" 174 versionKey = "eric6_ide"
175 info = engine.customValue(versionKey, "") 175 info = engine.customValue(versionKey, "")
176 lst = info.split('|') 176 lst = info.split('|')
177 177
178 dt = QDateTime() 178 dt = QDateTime()
179 if len(lst) and lst[0]: 179 if len(lst) and lst[0]:

eric ide

mercurial