Sun, 20 Jan 2019 19:38:51 +0100
Some changes to the Qt Help tools detection.
--- a/DocumentationTools/QtHelpGenerator.py Sun Jan 20 14:41:07 2019 +0100 +++ b/DocumentationTools/QtHelpGenerator.py Sun Jan 20 19:38:51 2019 +0100 @@ -17,6 +17,7 @@ from Utilities import joinext, relpath, html_encode, getQtBinariesPath, \ generateQtToolName +from Globals import qVersionTuple HelpCollection = r"""<?xml version="1.0" encoding="utf-8" ?> <QHelpCollectionProject version="1.0"> @@ -279,7 +280,8 @@ HelpProjectFile, "-o", os.path.join(self.outputDir, HelpHelpFile)]) os.remove(HelpProjectFile) - if self.createCollection: + # TODO: do this with qhelpgenerator >= 5.12.0 + if qVersionTuple() < (5, 12, 0) and self.createCollection: sys.stdout.write("Generating QtHelp collection...\n") sys.stdout.flush() sys.stderr.flush()
--- a/Plugins/PluginEricdoc.py Sun Jan 20 14:41:07 2019 +0100 +++ b/Plugins/PluginEricdoc.py Sun Jan 20 19:38:51 2019 +0100 @@ -18,6 +18,7 @@ from E5Gui.E5Action import E5Action +from Globals import qVersionTuple import Utilities import UI.Info @@ -87,21 +88,22 @@ "versionCleanup": (0, -1), }) - # 3. Qt Collection Generator - exe = os.path.join(Utilities.getQtBinariesPath(), 'qcollectiongenerator') - if Utilities.isWindowsPlatform(): - exe += '.exe' - dataList.append({ - "programEntry": True, - "header": QCoreApplication.translate( - "EricdocPlugin", "Qt Help Tools"), - "exe": exe, - "versionCommand": '-v', - "versionStartsWith": 'Qt', - "versionPosition": -1, - "version": "", - "versionCleanup": (0, -1), - }) + if qVersionTuple() < (5, 12, 0): + # 3. Qt Collection Generator + exe = os.path.join(Utilities.getQtBinariesPath(), 'qcollectiongenerator') + if Utilities.isWindowsPlatform(): + exe += '.exe' + dataList.append({ + "programEntry": True, + "header": QCoreApplication.translate( + "EricdocPlugin", "Qt Help Tools"), + "exe": exe, + "versionCommand": '-v', + "versionStartsWith": 'Qt', + "versionPosition": -1, + "version": "", + "versionCleanup": (0, -1), + }) return dataList
--- a/Preferences/ProgramsDialog.py Sun Jan 20 14:41:07 2019 +0100 +++ b/Preferences/ProgramsDialog.py Sun Jan 20 19:38:51 2019 +0100 @@ -340,6 +340,7 @@ font = itm.font(0) font.setBold(True) itm.setFont(0, font) + rememberedExe = exe if not exe: itm.setText(1, self.tr("(not configured)")) else: @@ -398,7 +399,12 @@ QTreeWidgetItem(itm, [exe, version]) itm.setExpanded(True) else: - itm.setText(1, self.tr("(not found)")) + if itm.childCount() == 0: + itm.setText(1, self.tr("(not found)")) + else: + QTreeWidgetItem(itm, [rememberedExe, + self.tr("(not found)")]) + itm.setExpanded(True) QApplication.processEvents() self.programsList.header().resizeSections(QHeaderView.ResizeToContents) self.programsList.header().setStretchLastSection(True)