eric6/WebBrowser/Network/NetworkManager.py

branch
maintenance
changeset 7824
096b3ebc1409
parent 7737
5371a22cf2aa
parent 7781
607a6098cb44
child 7924
8a96736d465e
diff -r 10554f5fac78 -r 096b3ebc1409 eric6/WebBrowser/Network/NetworkManager.py
--- a/eric6/WebBrowser/Network/NetworkManager.py	Sat Oct 03 11:14:23 2020 +0200
+++ b/eric6/WebBrowser/Network/NetworkManager.py	Sun Nov 01 11:15:18 2020 +0100
@@ -7,16 +7,16 @@
 Module implementing a network manager class.
 """
 
-
 import json
 
 from PyQt5.QtCore import pyqtSignal, QByteArray
-from PyQt5.QtWidgets import qApp, QStyle, QDialog
+from PyQt5.QtWidgets import QStyle, QDialog
 from PyQt5.QtNetwork import (
     QNetworkAccessManager, QNetworkProxy, QNetworkProxyFactory, QNetworkRequest
 )
 
 from E5Gui import E5MessageBox
+from E5Gui.E5Application import e5App
 
 from E5Network.E5NetworkProxyFactory import proxyAuthenticationRequired
 try:
@@ -152,7 +152,7 @@
         
         from .SslErrorExceptionsDialog import SslErrorExceptionsDialog
         dlg = SslErrorExceptionsDialog(self.__permanentlyIgnoredSslErrors)
-        if dlg.exec_() == QDialog.Accepted:
+        if dlg.exec() == QDialog.Accepted:
             self.__permanentlyIgnoredSslErrors = dlg.getSslErrorExceptions()
             self.changed.emit()
     
@@ -214,7 +214,7 @@
         tempButton = msgBox.addButton(self.tr("&Temporary accept"),
                                       E5MessageBox.AcceptRole)
         msgBox.addButton(self.tr("&Reject"), E5MessageBox.RejectRole)
-        msgBox.exec_()
+        msgBox.exec()
         if msgBox.clickedButton() == permButton:
             if host not in self.__permanentlyIgnoredSslErrors:
                 self.__permanentlyIgnoredSslErrors[host] = []
@@ -302,7 +302,7 @@
             )
             if username:
                 dlg.setData(username, password)
-        if dlg.exec_() == QDialog.Accepted:
+        if dlg.exec() == QDialog.Accepted:
             username, password = dlg.getData()
             auth.setUser(username)
             auth.setPassword(password)
@@ -327,10 +327,10 @@
         """
         html = getHtmlPage("authenticationErrorPage.html")
         html = html.replace("@IMAGE@", pixmapToDataUrl(
-            qApp.style().standardIcon(QStyle.SP_MessageBoxCritical).pixmap(
+            e5App().style().standardIcon(QStyle.SP_MessageBoxCritical).pixmap(
                 48, 48)).toString())
         html = html.replace("@FAVICON@", pixmapToDataUrl(
-            qApp.style() .standardIcon(QStyle.SP_MessageBoxCritical).pixmap(
+            e5App().style() .standardIcon(QStyle.SP_MessageBoxCritical).pixmap(
                 16, 16)).toString())
         html = html.replace("@TITLE@", self.tr("Authentication required"))
         html = html.replace("@H1@", self.tr("Authentication required"))

eric ide

mercurial