eric6/Preferences/__init__.py

changeset 7902
a5248d27c8a9
parent 7802
eefe954f01e8
child 7903
827d89937c30
--- a/eric6/Preferences/__init__.py	Sat Dec 19 19:57:09 2020 +0100
+++ b/eric6/Preferences/__init__.py	Sun Dec 20 12:35:26 2020 +0100
@@ -874,6 +874,7 @@
         "CustomViewer": "",
         "PythonDocDir": "",
         "Qt5DocDir": "",
+        "Qt6DocDir": "",
         "PyQt5DocDir": "",
         "PySide2DocDir": "",
         "EricDocDir": "",
@@ -2654,17 +2655,21 @@
     prefClass.settings.setValue("MultiProject/" + key, value)
 
 
-def getQt5DocDir(prefClass=Prefs):
+def getQtDocDir(version, prefClass=Prefs):
     """
     Module function to retrieve the Qt5DocDir setting.
     
+    @param Qt version to get documentation directory for
+    @type int
     @param prefClass preferences class used as the storage area
-    @return the requested Qt5DocDir setting (string)
+    @return the requested Qt5DocDir setting
+    @rtype str
     """
+    key = "Qt{0}DocDir".format(version)
     s = prefClass.settings.value(
-        "Help/Qt5DocDir", prefClass.helpDefaults["Qt5DocDir"])
+        "Help/{0}".format(key), prefClass.helpDefaults[key])
     if s == "":
-        s = os.getenv("QT5DOCDIR", "")
+        s = os.getenv(key.upper(), "")
     if s == "":
         s = os.path.join(
             QLibraryInfo.location(QLibraryInfo.DocumentationPath), "qtdoc")

eric ide

mercurial