eric6/WebBrowser/WebBrowserView.py

branch
maintenance
changeset 7824
096b3ebc1409
parent 7737
5371a22cf2aa
parent 7781
607a6098cb44
child 7924
8a96736d465e
--- a/eric6/WebBrowser/WebBrowserView.py	Sat Oct 03 11:14:23 2020 +0200
+++ b/eric6/WebBrowser/WebBrowserView.py	Sun Nov 01 11:15:18 2020 +0100
@@ -8,7 +8,6 @@
 Module implementing the web browser using QWebEngineView.
 """
 
-
 import os
 
 from PyQt5.QtCore import (
@@ -18,12 +17,13 @@
 from PyQt5.QtGui import (
     QDesktopServices, QClipboard, QIcon, QContextMenuEvent, QPixmap, QCursor
 )
-from PyQt5.QtWidgets import qApp, QStyle, QMenu, QApplication, QDialog
+from PyQt5.QtWidgets import QStyle, QMenu, QApplication, QDialog
 from PyQt5.QtWebEngineWidgets import (
     QWebEngineView, QWebEnginePage, QWebEngineDownloadItem
 )
 
 from E5Gui import E5MessageBox, E5FileDialog
+from E5Gui.E5Application import e5App
 
 from WebBrowser.WebBrowserWindow import WebBrowserWindow
 from .WebBrowserPage import WebBrowserPage
@@ -1150,7 +1150,7 @@
         from .Bookmarks.AddBookmarkDialog import AddBookmarkDialog
         dlg = AddBookmarkDialog()
         dlg.setUrl(bytes(url.toEncoded()).decode())
-        dlg.exec_()
+        dlg.exec()
     
     def __sendLink(self, act):
         """
@@ -1346,7 +1346,7 @@
         dlg.setUrl(bytes(self.url().toEncoded()).decode())
         dlg.setTitle(self.title())
         dlg.setDescription(description)
-        dlg.exec_()
+        dlg.exec()
     
     def dragEnterEvent(self, evt):
         """
@@ -1684,6 +1684,14 @@
             self.__siteIconLoader.deleteLater()
         self.__siteIconLoader = WebIconLoader(url, self)
         self.__siteIconLoader.iconLoaded.connect(self.__iconLoaded)
+        try:
+            self.__siteIconLoader.sslConfiguration.connect(
+                self.page().setSslConfiguration)
+            self.__siteIconLoader.clearSslConfiguration.connect(
+                self.page().clearSslConfiguration)
+        except AttributeError:
+            # no SSL available
+            pass
     
     def __iconLoaded(self, icon):
         """
@@ -1773,10 +1781,10 @@
         
         html = getHtmlPage("tabCrashPage.html")
         html = html.replace("@IMAGE@", pixmapToDataUrl(
-            qApp.style().standardIcon(QStyle.SP_MessageBoxWarning).pixmap(
+            e5App().style().standardIcon(QStyle.SP_MessageBoxWarning).pixmap(
                 48, 48)).toString())
         html = html.replace("@FAVICON@", pixmapToDataUrl(
-            qApp.style() .standardIcon(QStyle.SP_MessageBoxWarning).pixmap(
+            e5App().style() .standardIcon(QStyle.SP_MessageBoxWarning).pixmap(
                 16, 16)).toString())
         html = html.replace(
             "@TITLE@", self.tr("Render Process terminated abnormally"))
@@ -2328,7 +2336,7 @@
                     E5SslCertificateSelectionDialog
                 )
                 dlg = E5SslCertificateSelectionDialog(certificates, self)
-                if dlg.exec_() == QDialog.Accepted:
+                if dlg.exec() == QDialog.Accepted:
                     certificate = dlg.getSelectedCertificate()
                 
                 if certificate is None:

eric ide

mercurial