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() |