CodeDocumentationViewer: fixed issues related to the non-availability of either QtWebEngine or QtWebKit (e.g. using 32-bit PyQt5 wheel on Windows).

Thu, 23 Aug 2018 17:54:43 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 23 Aug 2018 17:54:43 +0200
changeset 6475
ed23eb2f20a4
parent 6474
72c063cc730b
child 6476
d13d573c2da4

CodeDocumentationViewer: fixed issues related to the non-availability of either QtWebEngine or QtWebKit (e.g. using 32-bit PyQt5 wheel on Windows).

UI/CodeDocumentationViewer.py file | annotate | diff | comparison | revisions
--- a/UI/CodeDocumentationViewer.py	Wed Aug 22 16:19:12 2018 +0200
+++ b/UI/CodeDocumentationViewer.py	Thu Aug 23 17:54:43 2018 +0200
@@ -316,8 +316,11 @@
         """
         Public method to finalize the setup of the documentation viewer.
         """
-        self.__showTextViewer(
-            Preferences.getDocuViewer("ShowInfoAsRichText"))
+        if self.__richTextViewer is None:
+            showRichText = False
+        else:
+            showRichText = Preferences.getDocuViewer("ShowInfoAsRichText")
+        self.__showTextViewer(showRichText)
         
         self.__startingUp = False
         provider = Preferences.getDocuViewer("Provider")
@@ -613,9 +616,12 @@
         """
         Public slot to handle a change of preferences.
         """
-        showMarkdown = Preferences.getDocuViewer("ShowInfoAsRichText")
-        if showMarkdown != self.__showMarkdown:
-            self.__showTextViewer(showMarkdown)
+        if self.__richTextViewer is None:
+            showRichText = False
+        else:
+            showRichText = Preferences.getDocuViewer("ShowInfoAsRichText")
+        if showRichText != self.__showMarkdown:
+            self.__showTextViewer(showRichText)
         
         provider = Preferences.getDocuViewer("Provider")
         self.__selectProvider(provider)

eric ide

mercurial