src/eric7/EricNetwork/EricNetworkProxyFactory.py

branch
eric7
changeset 9482
a2bc06a54d9d
parent 9473
3f23dbf37dbe
child 9624
b47dfa7a137d
equal deleted inserted replaced
9481:0b936ff1bbb9 9482:a2bc06a54d9d
42 Module slot to handle a proxy authentication request. 42 Module slot to handle a proxy authentication request.
43 43
44 @param proxy reference to the proxy object (QNetworkProxy) 44 @param proxy reference to the proxy object (QNetworkProxy)
45 @param auth reference to the authenticator object (QAuthenticator) 45 @param auth reference to the authenticator object (QAuthenticator)
46 """ 46 """
47 from eric7.UI.AuthenticationDialog import AuthenticationDialog
48
47 info = QCoreApplication.translate( 49 info = QCoreApplication.translate(
48 "EricNetworkProxyFactory", "<b>Connect to proxy '{0}' using:</b>" 50 "EricNetworkProxyFactory", "<b>Connect to proxy '{0}' using:</b>"
49 ).format(Utilities.html_encode(proxy.hostName())) 51 ).format(Utilities.html_encode(proxy.hostName()))
50
51 from eric7.UI.AuthenticationDialog import AuthenticationDialog
52 52
53 dlg = AuthenticationDialog(info, proxy.user(), True) 53 dlg = AuthenticationDialog(info, proxy.user(), True)
54 dlg.setData(proxy.user(), proxy.password()) 54 dlg.setData(proxy.user(), proxy.password())
55 if dlg.exec() == QDialog.DialogCode.Accepted: 55 if dlg.exec() == QDialog.DialogCode.Accepted:
56 username, password = dlg.getData() 56 username, password = dlg.getData()

eric ide

mercurial