eric6/WebBrowser/Network/NetworkManager.py

branch
maintenance
changeset 8176
31965986ecd1
parent 8043
0acf98cd089a
parent 8143
2c730d5fd177
child 8273
698ae46f40a4
equal deleted inserted replaced
8153:e01ae92db699 8176:31965986ecd1
150 """ 150 """
151 self.__load() 151 self.__load()
152 152
153 from .SslErrorExceptionsDialog import SslErrorExceptionsDialog 153 from .SslErrorExceptionsDialog import SslErrorExceptionsDialog
154 dlg = SslErrorExceptionsDialog(self.__permanentlyIgnoredSslErrors) 154 dlg = SslErrorExceptionsDialog(self.__permanentlyIgnoredSslErrors)
155 if dlg.exec() == QDialog.Accepted: 155 if dlg.exec() == QDialog.DialogCode.Accepted:
156 self.__permanentlyIgnoredSslErrors = dlg.getSslErrorExceptions() 156 self.__permanentlyIgnoredSslErrors = dlg.getSslErrorExceptions()
157 self.changed.emit() 157 self.changed.emit()
158 158
159 def clearSslExceptions(self): 159 def clearSslExceptions(self):
160 """ 160 """
300 WebBrowser.WebBrowserWindow.WebBrowserWindow 300 WebBrowser.WebBrowserWindow.WebBrowserWindow
301 .passwordManager().getLogin(url, realm) 301 .passwordManager().getLogin(url, realm)
302 ) 302 )
303 if username: 303 if username:
304 dlg.setData(username, password) 304 dlg.setData(username, password)
305 if dlg.exec() == QDialog.Accepted: 305 if dlg.exec() == QDialog.DialogCode.Accepted:
306 username, password = dlg.getData() 306 username, password = dlg.getData()
307 auth.setUser(username) 307 auth.setUser(username)
308 auth.setPassword(password) 308 auth.setPassword(password)
309 if Preferences.getUser("SavePasswords") and dlg.shallSave(): 309 if Preferences.getUser("SavePasswords") and dlg.shallSave():
310 ( 310 (
325 @param url reference to the URL requesting authentication 325 @param url reference to the URL requesting authentication
326 @type QUrl 326 @type QUrl
327 """ 327 """
328 html = getHtmlPage("authenticationErrorPage.html") 328 html = getHtmlPage("authenticationErrorPage.html")
329 html = html.replace("@IMAGE@", pixmapToDataUrl( 329 html = html.replace("@IMAGE@", pixmapToDataUrl(
330 e5App().style().standardIcon(QStyle.SP_MessageBoxCritical).pixmap( 330 e5App().style().standardIcon(
331 48, 48)).toString()) 331 QStyle.StandardPixmap.SP_MessageBoxCritical).pixmap(48, 48)
332 ).toString())
332 html = html.replace("@FAVICON@", pixmapToDataUrl( 333 html = html.replace("@FAVICON@", pixmapToDataUrl(
333 e5App().style() .standardIcon(QStyle.SP_MessageBoxCritical).pixmap( 334 e5App().style() .standardIcon(
334 16, 16)).toString()) 335 QStyle.StandardPixmap.SP_MessageBoxCritical).pixmap(16, 16)
336 ).toString())
335 html = html.replace("@TITLE@", self.tr("Authentication required")) 337 html = html.replace("@TITLE@", self.tr("Authentication required"))
336 html = html.replace("@H1@", self.tr("Authentication required")) 338 html = html.replace("@H1@", self.tr("Authentication required"))
337 html = html.replace( 339 html = html.replace(
338 "@LI-1@", 340 "@LI-1@",
339 self.tr("Authentication is required to access:")) 341 self.tr("Authentication is required to access:"))
420 @type QIODevice 422 @type QIODevice
421 @return reference to the network reply 423 @return reference to the network reply
422 @rtype QNetworkReply 424 @rtype QNetworkReply
423 """ 425 """
424 req = QNetworkRequest(request) 426 req = QNetworkRequest(request)
425 req.setAttribute(QNetworkRequest.SpdyAllowedAttribute, True) 427 req.setAttribute(
426 req.setAttribute(QNetworkRequest.FollowRedirectsAttribute, True) 428 QNetworkRequest.Attribute.SpdyAllowedAttribute, True)
429 req.setAttribute(
430 QNetworkRequest.Attribute.FollowRedirectsAttribute, True)
427 431
428 return super(NetworkManager, self).createRequest(op, req, data) 432 return super(NetworkManager, self).createRequest(op, req, data)

eric ide

mercurial