12 from PyQt4.QtCore import * |
12 from PyQt4.QtCore import * |
13 from PyQt4.QtGui import QMessageBox |
13 from PyQt4.QtGui import QMessageBox |
14 from PyQt4.QtNetwork import QTcpServer, QHostAddress, QHostInfo |
14 from PyQt4.QtNetwork import QTcpServer, QHostAddress, QHostInfo |
15 |
15 |
16 from E5Gui.E5Application import e5App |
16 from E5Gui.E5Application import e5App |
|
17 from E5Gui import E5MessageBox |
17 |
18 |
18 from .BreakPointModel import BreakPointModel |
19 from .BreakPointModel import BreakPointModel |
19 from .WatchPointModel import WatchPointModel |
20 from .WatchPointModel import WatchPointModel |
20 from . import DebugClientCapabilities |
21 from . import DebugClientCapabilities |
21 |
22 |
564 """ |
565 """ |
565 sock = self.nextPendingConnection() |
566 sock = self.nextPendingConnection() |
566 peerAddress = sock.peerAddress().toString() |
567 peerAddress = sock.peerAddress().toString() |
567 if peerAddress not in Preferences.getDebugger("AllowedHosts"): |
568 if peerAddress not in Preferences.getDebugger("AllowedHosts"): |
568 # the peer is not allowed to connect |
569 # the peer is not allowed to connect |
569 res = QMessageBox.warning(None, |
570 res = E5MessageBox.warning(None, |
570 self.trUtf8("Connection from illegal host"), |
571 self.trUtf8("Connection from illegal host"), |
571 self.trUtf8("""<p>A connection was attempted by the""" |
572 self.trUtf8("""<p>A connection was attempted by the""" |
572 """ illegal host <b>{0}</b>. Accept this connection?</p>""")\ |
573 """ illegal host <b>{0}</b>. Accept this connection?</p>""")\ |
573 .format(peerAddress), |
574 .format(peerAddress), |
574 QMessageBox.StandardButtons(\ |
575 QMessageBox.StandardButtons(\ |