67 from .DiffDialog import DiffDialog |
67 from .DiffDialog import DiffDialog |
68 from .CompareDialog import CompareDialog |
68 from .CompareDialog import CompareDialog |
69 from .LogView import LogViewer |
69 from .LogView import LogViewer |
70 from .FindFileDialog import FindFileDialog |
70 from .FindFileDialog import FindFileDialog |
71 from .FindFileNameDialog import FindFileNameDialog |
71 from .FindFileNameDialog import FindFileNameDialog |
72 from .AuthenticationDialog import AuthenticationDialog |
|
73 |
72 |
74 from E5Gui.E5SingleApplication import E5SingleApplicationServer |
73 from E5Gui.E5SingleApplication import E5SingleApplicationServer |
75 from E5Gui.E5Action import E5Action, createActionGroup |
74 from E5Gui.E5Action import E5Action, createActionGroup |
76 from E5Gui.E5ToolBarManager import E5ToolBarManager |
75 from E5Gui.E5ToolBarManager import E5ToolBarManager |
77 from E5Gui.E5ToolBarDialog import E5ToolBarDialog |
76 from E5Gui.E5ToolBarDialog import E5ToolBarDialog |
96 from E5XML.TasksHandler import TasksHandler |
95 from E5XML.TasksHandler import TasksHandler |
97 from E5XML.TasksWriter import TasksWriter |
96 from E5XML.TasksWriter import TasksWriter |
98 from E5XML.SessionWriter import SessionWriter |
97 from E5XML.SessionWriter import SessionWriter |
99 from E5XML.SessionHandler import SessionHandler |
98 from E5XML.SessionHandler import SessionHandler |
100 |
99 |
101 from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory |
100 from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory, proxyAuthenticationRequired |
102 |
101 |
103 from IconEditor.IconEditorWindow import IconEditorWindow |
102 from IconEditor.IconEditorWindow import IconEditorWindow |
104 |
103 |
105 from eric5config import getConfig |
104 from eric5config import getConfig |
106 |
105 |
618 |
617 |
619 # attributes for the network objects |
618 # attributes for the network objects |
620 self.__networkManager = QNetworkAccessManager(self) |
619 self.__networkManager = QNetworkAccessManager(self) |
621 self.connect(self.__networkManager, |
620 self.connect(self.__networkManager, |
622 SIGNAL('proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)'), |
621 SIGNAL('proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)'), |
623 self.__proxyAuthenticationRequired) |
622 proxyAuthenticationRequired) |
624 self.connect(self.__networkManager, |
623 self.connect(self.__networkManager, |
625 SIGNAL('sslErrors(QNetworkReply *, const QList<QSslError> &)'), |
624 SIGNAL('sslErrors(QNetworkReply *, const QList<QSslError> &)'), |
626 self.__sslErrors) |
625 self.__sslErrors) |
627 self.__replies = [] |
626 self.__replies = [] |
628 |
627 |
5520 line += 2 |
5519 line += 2 |
5521 versionText += self.trUtf8("""</table>""") |
5520 versionText += self.trUtf8("""</table>""") |
5522 |
5521 |
5523 QMessageBox.about(self, Program, versionText) |
5522 QMessageBox.about(self, Program, versionText) |
5524 |
5523 |
5525 def __proxyAuthenticationRequired(self, proxy, auth): |
|
5526 """ |
|
5527 Private slot to handle a proxy authentication request. |
|
5528 |
|
5529 @param proxy reference to the proxy object (QNetworkProxy) |
|
5530 @param auth reference to the authenticator object (QAuthenticator) |
|
5531 """ |
|
5532 info = self.trUtf8("<b>Connect to proxy '{0}' using:</b>")\ |
|
5533 .format(Qt.escape(proxy.hostName())) |
|
5534 |
|
5535 dlg = AuthenticationDialog(info, proxy.user(), True) |
|
5536 if dlg.exec_() == QDialog.Accepted: |
|
5537 username, password = dlg.getData() |
|
5538 auth.setUser(username) |
|
5539 auth.setPassword(password) |
|
5540 if dlg.shallSave(): |
|
5541 Preferences.setUI("ProxyUser", username) |
|
5542 Preferences.setUI("ProxyPassword", password) |
|
5543 |
|
5544 def __sslErrors(self, reply, errors): |
5524 def __sslErrors(self, reply, errors): |
5545 """ |
5525 """ |
5546 Private slot to handle SSL errors. |
5526 Private slot to handle SSL errors. |
5547 |
5527 |
5548 @param reply reference to the reply object (QNetworkReply) |
5528 @param reply reference to the reply object (QNetworkReply) |