--- a/src/eric7/Plugins/PluginEricdoc.py Sat Nov 26 12:30:14 2022 +0100 +++ b/src/eric7/Plugins/PluginEricdoc.py Sat Nov 26 15:54:32 2022 +0100 @@ -12,7 +12,7 @@ from PyQt6.QtCore import QCoreApplication, QObject from PyQt6.QtWidgets import QDialog -from eric7 import Utilities +from eric7 import Preferences, Utilities from eric7.EricGui.EricAction import EricAction from eric7.EricWidgets.EricApplication import ericApp from eric7.Globals import getConfig @@ -90,30 +90,24 @@ # 2. Qt Help Generator # 2.1 location before 6.3 (Linux and macOS) and Windows - exe = os.path.join( - Utilities.getQtBinariesPath(), Utilities.generateQtToolName("qhelpgenerator") - ) - if Utilities.isWindowsPlatform(): - exe += ".exe" - if os.path.exists(exe): - dataList.append( - { - "programEntry": True, - "header": QCoreApplication.translate("EricdocPlugin", "Qt Help Tools"), - "exe": exe, - "versionCommand": "-v", - "versionStartsWith": "Qt", - "versionPosition": -1, - "version": "", - "versionCleanup": (0, -1), - } - ) - else: - # 2.2 location starting with 6.3.0 (Linux and macOS) + exe = Preferences.getQt("QHelpGenerator") + + if not exe: + # 2.2 location before 6.3 (Linux and macOS) and Windows exe = os.path.join( - Utilities.getQtBinariesPath(libexec=True), + Utilities.getQtBinariesPath(), Utilities.generateQtToolName("qhelpgenerator"), ) + if Utilities.isWindowsPlatform(): + exe += ".exe" + if not os.path.exists(exe): + # 2.3 location starting with 6.3.0 (Linux and macOS) + exe = os.path.join( + Utilities.getQtBinariesPath(libexec=True), + Utilities.generateQtToolName("qhelpgenerator"), + ) + + if exe: dataList.append( { "programEntry": True,