Helpviewer/Network/NetworkAccessManager.py

changeset 286
652f5159f1c3
parent 280
e477e5660014
child 381
64ae9e09d8bc
diff -r 06d3067f8a63 -r 652f5159f1c3 Helpviewer/Network/NetworkAccessManager.py
--- a/Helpviewer/Network/NetworkAccessManager.py	Wed May 26 08:37:24 2010 +0200
+++ b/Helpviewer/Network/NetworkAccessManager.py	Wed May 26 17:53:53 2010 +0200
@@ -18,7 +18,7 @@
 except ImportError:
     SSL_AVAILABLE = False
 
-from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory
+from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory, proxyAuthenticationRequired
 
 from UI.AuthenticationDialog import AuthenticationDialog
 
@@ -80,7 +80,7 @@
         
         self.connect(self, 
             SIGNAL('proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)'),
-            self.__proxyAuthenticationRequired)
+            proxyAuthenticationRequired)
         self.connect(self, 
             SIGNAL('authenticationRequired(QNetworkReply *, QAuthenticator *)'), 
             self.__authenticationRequired)
@@ -181,27 +181,6 @@
                 Helpviewer.HelpWindow.HelpWindow.passwordManager().setLogin(
                     reply.url(), auth.realm(), username, password)
     
-    def __proxyAuthenticationRequired(self, proxy, auth):
-        """
-        Private slot to handle a proxy authentication request.
-        
-        @param proxy reference to the proxy object (QNetworkProxy)
-        @param auth reference to the authenticator object (QAuthenticator)
-        """
-        info = self.trUtf8("<b>Connect to proxy '{0}' using:</b>")\
-            .format(Qt.escape(proxy.hostName()))
-        
-        dlg = AuthenticationDialog(info, proxy.user(), True)
-        if dlg.exec_() == QDialog.Accepted:
-            username, password = dlg.getData()
-            auth.setUser(username)
-            auth.setPassword(password)
-            if dlg.shallSave():
-                Preferences.setUI("ProxyUser", username)
-                Preferences.setUI("ProxyPassword", password)
-                proxy.setUser(username)
-                proxy.setPassword(password)
-    
     def __sslErrors(self, reply, errors):
         """
         Private slot to handle SSL errors.

eric ide

mercurial