src/eric7/DocumentationTools/QtHelpGenerator.py

branch
eric7
changeset 9624
b47dfa7a137d
parent 9536
c1c84299bef3
child 9653
e67609152c5e
--- a/src/eric7/DocumentationTools/QtHelpGenerator.py	Sun Dec 18 14:19:10 2022 +0100
+++ b/src/eric7/DocumentationTools/QtHelpGenerator.py	Sun Dec 18 19:33:46 2022 +0100
@@ -14,7 +14,8 @@
 import sys
 
 from eric7 import Preferences
-from eric7.Utilities import generateQtToolName, getQtBinariesPath, html_encode, joinext
+from eric7.SystemUtilities import FileSystemUtilities, QtUtilities
+from eric7.Utilities import html_encode
 
 HelpCollection = r"""<?xml version="1.0" encoding="utf-8" ?>
 <QHelpCollectionProject version="1.0">
@@ -132,7 +133,7 @@
 
             kwEntry = (
                 "{0} (Package)".format(package.split(".")[-1]),
-                joinext("index-{0}".format(package), ".html"),
+                FileSystemUtilities.joinext("index-{0}".format(package), ".html"),
             )
             if kwEntry not in self.keywords:
                 self.keywords.append(kwEntry)
@@ -150,14 +151,16 @@
         if "__init__" not in file:
             kwEntry = (
                 "{0} (Module)".format(moduleDocument.name().split(".")[-1]),
-                joinext(moduleDocument.name(), ".html"),
+                FileSystemUtilities.joinext(moduleDocument.name(), ".html"),
             )
             if kwEntry not in self.keywords:
                 self.keywords.append(kwEntry)
         for kw in moduleDocument.getQtHelpKeywords():
             kwEntry = (
                 kw[0],
-                "{0}{1}".format(joinext(moduleDocument.name(), ".html"), kw[1]),
+                "{0}{1}".format(
+                    FileSystemUtilities.joinext(moduleDocument.name(), ".html"), kw[1]
+                ),
             )
             if kwEntry not in self.keywords:
                 self.keywords.append(kwEntry)
@@ -175,14 +178,14 @@
         s = indent + '<section title="{0}" ref="{1}">\n'.format(
             package == "00index" and self.title or package,
             package == "00index"
-            and joinext("index", ".html")
-            or joinext("index-{0}".format(package), ".html"),
+            and FileSystemUtilities.joinext("index", ".html")
+            or FileSystemUtilities.joinext("index-{0}".format(package), ".html"),
         )
         for subpack in sorted(self.packages[package]["subpackages"]):
             s += self.__generateSections(subpack, level + 1) + "\n"
         for mod in sorted(self.packages[package]["modules"]):
             s += indent1 + '<section title="{0}" ref="{1}" />\n'.format(
-                mod, joinext(mod, ".html")
+                mod, FileSystemUtilities.joinext(mod, ".html")
             )
         s += indent + "</section>"
         return s
@@ -288,12 +291,13 @@
         qhelpgeneratorExe = Preferences.getQt("QHelpGenerator")
         if not qhelpgeneratorExe:
             qhelpgeneratorExe = os.path.join(
-                getQtBinariesPath(libexec=True), generateQtToolName("qhelpgenerator")
+                QtUtilities.getQtBinariesPath(libexec=True),
+                QtUtilities.generateQtToolName("qhelpgenerator"),
             )
             if not os.path.exists(qhelpgeneratorExe):
                 qhelpgeneratorExe = os.path.join(
-                    getQtBinariesPath(libexec=False),
-                    generateQtToolName("qhelpgenerator"),
+                    QtUtilities.getQtBinariesPath(libexec=False),
+                    QtUtilities.generateQtToolName("qhelpgenerator"),
                 )
         shutil.copy(os.path.join(self.outputDir, HelpProjectFile), self.htmlDir)
         os.chdir(self.htmlDir)

eric ide

mercurial