17 QWhatsThis, QToolBar, QDialog, QSplitter, QApplication, QMenu, QProgressDialog, \ |
17 QWhatsThis, QToolBar, QDialog, QSplitter, QApplication, QMenu, QProgressDialog, \ |
18 QVBoxLayout, QDockWidget, QAction, QLabel |
18 QVBoxLayout, QDockWidget, QAction, QLabel |
19 from PyQt4.Qsci import QSCINTILLA_VERSION_STR |
19 from PyQt4.Qsci import QSCINTILLA_VERSION_STR |
20 from PyQt4.QtNetwork import QNetworkProxyFactory, QNetworkAccessManager, \ |
20 from PyQt4.QtNetwork import QNetworkProxyFactory, QNetworkAccessManager, \ |
21 QNetworkRequest, QNetworkReply |
21 QNetworkRequest, QNetworkReply |
22 try: |
|
23 from PyQt4.QtNetwork import QSslError # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ |
|
24 SSL_AVAILABLE = True |
|
25 except ImportError: |
|
26 SSL_AVAILABLE = False |
|
27 |
22 |
28 from Debugger.DebugUI import DebugUI |
23 from Debugger.DebugUI import DebugUI |
29 from Debugger.DebugServer import DebugServer |
24 from Debugger.DebugServer import DebugServer |
30 from Debugger.DebugViewer import DebugViewer |
25 from Debugger.DebugViewer import DebugViewer |
31 from Debugger.DebugClientCapabilities import HasUnittest |
26 from Debugger.DebugClientCapabilities import HasUnittest |
108 from E5XML.SessionReader import SessionReader |
103 from E5XML.SessionReader import SessionReader |
109 from E5XML.SessionWriter import SessionWriter |
104 from E5XML.SessionWriter import SessionWriter |
110 |
105 |
111 from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory, \ |
106 from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory, \ |
112 proxyAuthenticationRequired |
107 proxyAuthenticationRequired |
|
108 try: |
|
109 from E5Network.E5SslErrorHandler import E5SslErrorHandler |
|
110 SSL_AVAILABLE = True |
|
111 except ImportError: |
|
112 SSL_AVAILABLE = False |
113 |
113 |
114 from IconEditor.IconEditorWindow import IconEditorWindow |
114 from IconEditor.IconEditorWindow import IconEditorWindow |
115 |
115 |
116 from eric5config import getConfig |
116 from eric5config import getConfig |
117 |
117 |
569 # attributes for the network objects |
569 # attributes for the network objects |
570 self.__networkManager = QNetworkAccessManager(self) |
570 self.__networkManager = QNetworkAccessManager(self) |
571 self.__networkManager.proxyAuthenticationRequired.connect( |
571 self.__networkManager.proxyAuthenticationRequired.connect( |
572 proxyAuthenticationRequired) |
572 proxyAuthenticationRequired) |
573 if SSL_AVAILABLE: |
573 if SSL_AVAILABLE: |
|
574 self.__sslErrorHandler = E5SslErrorHandler(self) |
574 self.__networkManager.sslErrors.connect(self.__sslErrors) |
575 self.__networkManager.sslErrors.connect(self.__sslErrors) |
575 self.__replies = [] |
576 self.__replies = [] |
576 |
577 |
577 # attribute for the help window |
578 # attribute for the help window |
578 self.helpWindow = None |
579 self.helpWindow = None |
5487 Private slot to handle SSL errors. |
5488 Private slot to handle SSL errors. |
5488 |
5489 |
5489 @param reply reference to the reply object (QNetworkReply) |
5490 @param reply reference to the reply object (QNetworkReply) |
5490 @param errors list of SSL errors (list of QSslError) |
5491 @param errors list of SSL errors (list of QSslError) |
5491 """ |
5492 """ |
5492 errorStrings = [] |
5493 ignore = self.__sslErrorHandler.sslErrorsReply(reply, errors)[0] |
5493 if errors: |
5494 if not ignore: |
5494 for err in errors: |
|
5495 errorStrings.append(err.errorString()) |
|
5496 errorString = '.<br />'.join(errorStrings) |
|
5497 ret = E5MessageBox.yesNo(self, |
|
5498 self.trUtf8("SSL Errors"), |
|
5499 self.trUtf8("""<p>SSL Errors:</p>""" |
|
5500 """<p>{0}</p>""" |
|
5501 """<p>Do you want to ignore these errors?</p>""")\ |
|
5502 .format(errorString), |
|
5503 icon=E5MessageBox.Warning) |
|
5504 else: |
|
5505 ret = True |
|
5506 if ret: |
|
5507 reply.ignoreSslErrors() |
|
5508 else: |
|
5509 self.__downloadCancelled = True |
5495 self.__downloadCancelled = True |
5510 reply.abort() |
|
5511 |
5496 |
5512 ####################################### |
5497 ####################################### |
5513 ## Below are methods for various checks |
5498 ## Below are methods for various checks |
5514 ####################################### |
5499 ####################################### |
5515 |
5500 |