eric6/WebBrowser/Network/NetworkManager.py

changeset 7761
ed2c67d20328
parent 7759
51aa6c6b66f7
child 7781
607a6098cb44
equal deleted inserted replaced
7760:fcd3322bf6ed 7761:ed2c67d20328
9 9
10 10
11 import json 11 import json
12 12
13 from PyQt5.QtCore import pyqtSignal, QByteArray 13 from PyQt5.QtCore import pyqtSignal, QByteArray
14 from PyQt5.QtWidgets import qApp, QStyle, QDialog 14 from PyQt5.QtWidgets import QStyle, QDialog
15 from PyQt5.QtNetwork import ( 15 from PyQt5.QtNetwork import (
16 QNetworkAccessManager, QNetworkProxy, QNetworkProxyFactory, QNetworkRequest 16 QNetworkAccessManager, QNetworkProxy, QNetworkProxyFactory, QNetworkRequest
17 ) 17 )
18 18
19 from E5Gui import E5MessageBox 19 from E5Gui import E5MessageBox
20 from E5Gui.E5Application import e5App
20 21
21 from E5Network.E5NetworkProxyFactory import proxyAuthenticationRequired 22 from E5Network.E5NetworkProxyFactory import proxyAuthenticationRequired
22 try: 23 try:
23 from E5Network.E5SslErrorHandler import E5SslErrorHandler 24 from E5Network.E5SslErrorHandler import E5SslErrorHandler
24 SSL_AVAILABLE = True 25 SSL_AVAILABLE = True
325 @param url reference to the URL requesting authentication 326 @param url reference to the URL requesting authentication
326 @type QUrl 327 @type QUrl
327 """ 328 """
328 html = getHtmlPage("authenticationErrorPage.html") 329 html = getHtmlPage("authenticationErrorPage.html")
329 html = html.replace("@IMAGE@", pixmapToDataUrl( 330 html = html.replace("@IMAGE@", pixmapToDataUrl(
330 qApp.style().standardIcon(QStyle.SP_MessageBoxCritical).pixmap( 331 e5App().style().standardIcon(QStyle.SP_MessageBoxCritical).pixmap(
331 48, 48)).toString()) 332 48, 48)).toString())
332 html = html.replace("@FAVICON@", pixmapToDataUrl( 333 html = html.replace("@FAVICON@", pixmapToDataUrl(
333 qApp.style() .standardIcon(QStyle.SP_MessageBoxCritical).pixmap( 334 e5App().style() .standardIcon(QStyle.SP_MessageBoxCritical).pixmap(
334 16, 16)).toString()) 335 16, 16)).toString())
335 html = html.replace("@TITLE@", self.tr("Authentication required")) 336 html = html.replace("@TITLE@", self.tr("Authentication required"))
336 html = html.replace("@H1@", self.tr("Authentication required")) 337 html = html.replace("@H1@", self.tr("Authentication required"))
337 html = html.replace( 338 html = html.replace(
338 "@LI-1@", 339 "@LI-1@",

eric ide

mercurial