Sun, 19 Sep 2021 16:26:29 +0200
Implemented four workarounds to suppress use of QtWebEngine on non-Linux systems because of issues in Qt 6.2.0 rc0.
--- a/eric7/UI/CodeDocumentationViewer.py Sun Sep 19 16:13:41 2021 +0200 +++ b/eric7/UI/CodeDocumentationViewer.py Sun Sep 19 16:26:29 2021 +0200 @@ -81,6 +81,12 @@ self.__verticalLayout.setContentsMargins(0, 0, 0, 0) try: + # TODO: remove this workaround once rc0 issue is fixed + # Workaround for a bug in Qt 6.2.0 rc0 on non-Linux + import sys + if not sys.platform.startswith("linux"): + raise ImportError + from PyQt6.QtWebEngineCore import QWebEngineSettings from PyQt6.QtWebEngineWidgets import QWebEngineView self.__contents = QWebEngineView(self)
--- a/eric7/UI/Previewers/PreviewerHTML.py Sun Sep 19 16:13:41 2021 +0200 +++ b/eric7/UI/Previewers/PreviewerHTML.py Sun Sep 19 16:26:29 2021 +0200 @@ -51,6 +51,11 @@ self.__previewAvailable = True try: + # TODO: remove this workaround once rc0 issue is fixed + # Workaround for a bug in Qt 6.2.0 rc0 on non-Linux + if not sys.platform.startswith("linux"): + raise ImportError + from PyQt6.QtWebEngineWidgets import QWebEngineView self.previewView = QWebEngineView(self) self.previewView.page().linkHovered.connect(self.__showLink)
--- a/eric7/eric7.py Sun Sep 19 16:13:41 2021 +0200 +++ b/eric7/eric7.py Sun Sep 19 16:26:29 2021 +0200 @@ -42,9 +42,12 @@ " it is installed and accessible.") sys.exit(100) -with contextlib.suppress(ImportError): - from PyQt6 import QtWebEngineWidgets - # __IGNORE_WARNING__ __IGNORE_EXCEPTION__ +# TODO: remove this workaround once rc0 issue is fixed +# Workaround for a bug in Qt 6.2.0 rc0 on non-Linux +if sys.platform.startswith("linux"): + with contextlib.suppress(ImportError): + from PyQt6 import QtWebEngineWidgets + # __IGNORE_WARNING__ __IGNORE_EXCEPTION__ # some global variables needed to start the application args = None
--- a/eric7/eric7_browser.py Sun Sep 19 16:13:41 2021 +0200 +++ b/eric7/eric7_browser.py Sun Sep 19 16:26:29 2021 +0200 @@ -36,6 +36,11 @@ sys.argv.remove(arg) try: + # TODO: remove this workaround once rc0 issue is fixed + # Workaround for a bug in Qt 6.2.0 rc0 on non-Linux + if not sys.platform.startswith("linux"): + raise ImportError + from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__ except ImportError: if "--quiet" not in sys.argv: