29 |
29 |
30 from E5Gui import E5MessageBox |
30 from E5Gui import E5MessageBox |
31 from E5Gui.E5MainWindow import E5MainWindow |
31 from E5Gui.E5MainWindow import E5MainWindow |
32 from E5Gui.E5Application import e5App |
32 from E5Gui.E5Application import e5App |
33 |
33 |
34 from E5Network.E5NetworkProxyFactory import proxyAuthenticationRequired |
34 from EricNetwork.EricNetworkProxyFactory import proxyAuthenticationRequired |
35 try: |
35 try: |
36 from E5Network.E5SslErrorHandler import E5SslErrorHandler, E5SslErrorState |
36 from EricNetwork.EricSslErrorHandler import EricSslErrorHandler, EricSslErrorState |
37 SSL_AVAILABLE = True |
37 SSL_AVAILABLE = True |
38 except ImportError: |
38 except ImportError: |
39 SSL_AVAILABLE = False |
39 SSL_AVAILABLE = False |
40 |
40 |
41 import Globals |
41 import Globals |
134 # attributes for the network objects |
134 # attributes for the network objects |
135 self.__networkManager = QNetworkAccessManager(self) |
135 self.__networkManager = QNetworkAccessManager(self) |
136 self.__networkManager.proxyAuthenticationRequired.connect( |
136 self.__networkManager.proxyAuthenticationRequired.connect( |
137 proxyAuthenticationRequired) |
137 proxyAuthenticationRequired) |
138 if SSL_AVAILABLE: |
138 if SSL_AVAILABLE: |
139 self.__sslErrorHandler = E5SslErrorHandler(self) |
139 self.__sslErrorHandler = EricSslErrorHandler(self) |
140 self.__networkManager.sslErrors.connect(self.__sslErrors) |
140 self.__networkManager.sslErrors.connect(self.__sslErrors) |
141 self.__replies = [] |
141 self.__replies = [] |
142 |
142 |
143 self.__pluginsToDownload = [] |
143 self.__pluginsToDownload = [] |
144 self.__pluginsDownloaded = [] |
144 self.__pluginsDownloaded = [] |
687 |
687 |
688 @param reply reference to the reply object (QNetworkReply) |
688 @param reply reference to the reply object (QNetworkReply) |
689 @param errors list of SSL errors (list of QSslError) |
689 @param errors list of SSL errors (list of QSslError) |
690 """ |
690 """ |
691 ignored = self.__sslErrorHandler.sslErrorsReply(reply, errors)[0] |
691 ignored = self.__sslErrorHandler.sslErrorsReply(reply, errors)[0] |
692 if ignored == E5SslErrorState.NOT_IGNORED: |
692 if ignored == EricSslErrorState.NOT_IGNORED: |
693 self.__downloadCancel(reply) |
693 self.__downloadCancel(reply) |
694 |
694 |
695 def getDownloadedPlugins(self): |
695 def getDownloadedPlugins(self): |
696 """ |
696 """ |
697 Public method to get the list of recently downloaded plugin files. |
697 Public method to get the list of recently downloaded plugin files. |