WebBrowser/QtHelp/HelpDocsInstaller.py

changeset 5736
000ea446ff4b
parent 5389
9b1c800daff3
child 6048
82ad8ec9548c
equal deleted inserted replaced
5735:f606dbe20be6 5736:000ea446ff4b
10 10
11 from __future__ import unicode_literals 11 from __future__ import unicode_literals
12 12
13 import os 13 import os
14 14
15 from PyQt5.QtCore import pyqtSignal, qVersion, QThread, Qt, QMutex, \ 15 from PyQt5.QtCore import pyqtSignal, QThread, Qt, QMutex, QDateTime, QDir, \
16 QDateTime, QDir, QLibraryInfo, QFileInfo 16 QLibraryInfo, QFileInfo
17 from PyQt5.QtHelp import QHelpEngineCore 17 from PyQt5.QtHelp import QHelpEngineCore
18 18
19 from eric6config import getConfig 19 from eric6config import getConfig
20
21 from Globals import qVersionTuple
20 22
21 23
22 class HelpDocsInstaller(QThread): 24 class HelpDocsInstaller(QThread):
23 """ 25 """
24 Class implementing the worker thread populating and updating the QtHelp 26 Class implementing the worker thread populating and updating the QtHelp
132 len(QDir(docsPath).entryList(["*.qch"])) == 0: 134 len(QDir(docsPath).entryList(["*.qch"])) == 0:
133 # Qt installer is a bit buggy; it's missing a symbolic link 135 # Qt installer is a bit buggy; it's missing a symbolic link
134 docsPathList = QDir.fromNativeSeparators(docsPath).split("/") 136 docsPathList = QDir.fromNativeSeparators(docsPath).split("/")
135 docsPath = os.sep.join( 137 docsPath = os.sep.join(
136 docsPathList[:-3] + 138 docsPathList[:-3] +
137 ["Docs", "Qt-{0}".format(qVersion()[:3])]) 139 ["Docs", "Qt-{0}.{1}".format(*qVersionTuple())])
138 docsPath = QDir(docsPath) 140 docsPath = QDir(docsPath)
139 else: 141 else:
140 # unsupported Qt version 142 # unsupported Qt version
141 return False 143 return False
142 144

eric ide

mercurial