47 @param proxy reference to the proxy object |
47 @param proxy reference to the proxy object |
48 @type QNetworkProxy |
48 @type QNetworkProxy |
49 @param auth reference to the authenticator object |
49 @param auth reference to the authenticator object |
50 @type QAuthenticator |
50 @type QAuthenticator |
51 """ |
51 """ |
52 from eric7.UI.AuthenticationDialog import AuthenticationDialog |
52 from eric7.EricWidgets.EricAuthenticationDialog import EricAuthenticationDialog |
53 |
53 |
54 info = QCoreApplication.translate( |
54 info = QCoreApplication.translate( |
55 "EricNetworkProxyFactory", "<b>Connect to proxy '{0}' using:</b>" |
55 "EricNetworkProxyFactory", "<b>Connect to proxy '{0}' using:</b>" |
56 ).format(Utilities.html_encode(proxy.hostName())) |
56 ).format(Utilities.html_encode(proxy.hostName())) |
57 |
57 |
58 dlg = AuthenticationDialog(info, proxy.user(), True) |
58 dlg = EricAuthenticationDialog(info, proxy.user(), True) |
59 dlg.setData(proxy.user(), proxy.password()) |
59 dlg.setData(proxy.user(), proxy.password()) |
60 if dlg.exec() == QDialog.DialogCode.Accepted: |
60 if dlg.exec() == QDialog.DialogCode.Accepted: |
61 username, password = dlg.getData() |
61 username, password = dlg.getData() |
62 auth.setUser(username) |
62 auth.setUser(username) |
63 auth.setPassword(password) |
63 auth.setPassword(password) |