4863 os.path.join(os.path.dirname(sys.executable), "doc")) |
4863 os.path.join(os.path.dirname(sys.executable), "doc")) |
4864 else: |
4864 else: |
4865 pythonDocDir = Utilities.getEnvironmentEntry( |
4865 pythonDocDir = Utilities.getEnvironmentEntry( |
4866 "PYTHON3DOCDIR", |
4866 "PYTHON3DOCDIR", |
4867 '/usr/share/doc/packages/python3/html') |
4867 '/usr/share/doc/packages/python3/html') |
4868 if not pythonDocDir.startswith(("http://", "https://")): |
4868 if not pythonDocDir.startswith(("http://", "https://", "qthelp://")): |
4869 if pythonDocDir.startswith("file://"): |
4869 if pythonDocDir.startswith("file://"): |
4870 pythonDocDir = pythonDocDir[7:] |
4870 pythonDocDir = pythonDocDir[7:] |
4871 if not os.path.splitext(pythonDocDir)[1]: |
4871 if not os.path.splitext(pythonDocDir)[1]: |
4872 home = Utilities.normjoinpath(pythonDocDir, 'index.html') |
4872 home = Utilities.normjoinpath(pythonDocDir, 'index.html') |
4873 |
4873 |
4932 Utilities.getEnvironmentEntry("PYTHON2DOCDIR", default) |
4932 Utilities.getEnvironmentEntry("PYTHON2DOCDIR", default) |
4933 else: |
4933 else: |
4934 pythonDocDir = Utilities.getEnvironmentEntry( |
4934 pythonDocDir = Utilities.getEnvironmentEntry( |
4935 "PYTHON2DOCDIR", |
4935 "PYTHON2DOCDIR", |
4936 '/usr/share/doc/packages/python/html') |
4936 '/usr/share/doc/packages/python/html') |
4937 if not pythonDocDir.startswith(("http://", "https://")): |
4937 if not pythonDocDir.startswith(("http://", "https://", "qthelp://")): |
4938 if pythonDocDir.startswith("file://"): |
4938 if pythonDocDir.startswith("file://"): |
4939 pythonDocDir = pythonDocDir[7:] |
4939 pythonDocDir = pythonDocDir[7:] |
4940 if not os.path.splitext(pythonDocDir)[1]: |
4940 if not os.path.splitext(pythonDocDir)[1]: |
4941 home = Utilities.normjoinpath(pythonDocDir, 'index.html') |
4941 home = Utilities.normjoinpath(pythonDocDir, 'index.html') |
4942 else: |
4942 else: |
5061 self.tr("Documentation"), |
5061 self.tr("Documentation"), |
5062 self.tr("""<p>The PyQt4 documentation starting point""" |
5062 self.tr("""<p>The PyQt4 documentation starting point""" |
5063 """ has not been configured.</p>""")) |
5063 """ has not been configured.</p>""")) |
5064 return |
5064 return |
5065 |
5065 |
5066 if not pyqt4DocDir.startswith(("http://", "https://")): |
5066 if not pyqt4DocDir.startswith(("http://", "https://", "qthelp://")): |
5067 home = "" |
5067 home = "" |
5068 if pyqt4DocDir: |
5068 if pyqt4DocDir: |
5069 if pyqt4DocDir.startswith("file://"): |
5069 if pyqt4DocDir.startswith("file://"): |
5070 pyqt4DocDir = pyqt4DocDir[7:] |
5070 pyqt4DocDir = pyqt4DocDir[7:] |
5071 if not os.path.splitext(pyqt4DocDir)[1]: |
5071 if not os.path.splitext(pyqt4DocDir)[1]: |
5126 self.tr("Documentation"), |
5126 self.tr("Documentation"), |
5127 self.tr("""<p>The PyQt5 documentation starting point""" |
5127 self.tr("""<p>The PyQt5 documentation starting point""" |
5128 """ has not been configured.</p>""")) |
5128 """ has not been configured.</p>""")) |
5129 return |
5129 return |
5130 |
5130 |
5131 if not pyqt5DocDir.startswith(("http://", "https://")): |
5131 if not pyqt5DocDir.startswith(("http://", "https://", "qthelp://")): |
5132 home = "" |
5132 home = "" |
5133 if pyqt5DocDir: |
5133 if pyqt5DocDir: |
5134 if pyqt5DocDir.startswith("file://"): |
5134 if pyqt5DocDir.startswith("file://"): |
5135 pyqt5DocDir = pyqt5DocDir[7:] |
5135 pyqt5DocDir = pyqt5DocDir[7:] |
5136 if not os.path.splitext(pyqt5DocDir)[1]: |
5136 if not os.path.splitext(pyqt5DocDir)[1]: |
5233 self.tr("Documentation"), |
5233 self.tr("Documentation"), |
5234 self.tr("""<p>The PySide documentation starting point""" |
5234 self.tr("""<p>The PySide documentation starting point""" |
5235 """ has not been configured.</p>""")) |
5235 """ has not been configured.</p>""")) |
5236 return |
5236 return |
5237 |
5237 |
5238 if not pysideDocDir.startswith(("http://", "https://")): |
5238 if not pysideDocDir.startswith(("http://", "https://", "qthelp://")): |
5239 if pysideDocDir.startswith("file://"): |
5239 if pysideDocDir.startswith("file://"): |
5240 pysideDocDir = pysideDocDir[7:] |
5240 pysideDocDir = pysideDocDir[7:] |
5241 if not os.path.splitext(pysideDocDir)[1]: |
5241 if not os.path.splitext(pysideDocDir)[1]: |
5242 home = Utilities.normjoinpath(pysideDocDir, 'index.html') |
5242 home = Utilities.normjoinpath(pysideDocDir, 'index.html') |
5243 else: |
5243 else: |